create new backend file from existing one

quicova

Registered User.
Local time
Today, 09:02
Joined
Oct 31, 2013
Messages
12
Hello everyone.

I'm trying to create a button that will open a save window so that user can select where and the name of a new backend file.

and create a new backend file from the one in use and link to the new open.

anyone has any ideas on how to go about this and can help me out,
I'm very new to scripting. so if anyone can point me in the right direction it would be awesome.

Thanks so much
 
sorry.

I'm trying to create a button that will create a new backend empty file and save it.

I have a empty backend file, which has all the tables but nothing inside the tables.
I'm trying to make it that every time the frontend opens it links to that empty backend file.

Then on the main form I need a button "create new Project" for example that will create a new empty backend file, promt the user for a file name and location and be ready to be populated.
 
I'm trying to create a button that will create a new backend empty file and save it.
As far as I know this is not possible. But:

Make a copy to your actual BE file. Remove from this copy all (unnecessary) records.
Do a Compact and Repair (this action will reset the AutoNumbers to 1 for empty tables)
Change the file name AND extension . Something like FileName.npf (npf = New Project File).
Move this file in the same folder with your FE.

Create the NewProject button and manage to copy the FileName.npf to a folder (and with the name) indicated by the user. Change the .npf extension to the real one (.mdb or .accdb).
Also you must have code to link the FE to this (new) BE. In fact you must have code to switch between projects by linking the FE to any BE.

I'm very sure that this is doable.
Of course I can't give you the whole code from the top of my head, but ask step by step what you need and I'll provide you with code (if I have) that you can adapt to your needs or with the right directions (what to google).

I'm very new to scripting
This can be a problem but the project is not very hard and I think that you can learn a lot in this time.

Good luck !
 
One more advice:
Wait for a while (few days) before to start. Maybe someone else has a better idea.
 

Users who are viewing this thread

Back
Top Bottom