Using the same structure file, you can select a different data file or create a new data file. You can do this while opening a database or programmatically while the database is open. When opening a database, you can select a different data file or a new data file by pressing the Alt key (Option on Mac OS) or by clicking 'other' in the expanded options area of the Open Database dialog box. You can select a different data file or a new data file programmatically by using the 'Open Data File' or 'Create Data File' command. These commands take the access path of the data file as argument and open or create a data file replacing the current data file opened by the application.
The code below will replace the current data file with a data file 'Backup1.data' (Mac OS) located in the 'Project' folder:
Open Data File($accesspath)