Hi,
I'm not sure whether this question should have gone in the VBA page, but rather than spam the place I'll just leave it here
I have a replicated database. It autoloads the switchboard form on opening. I also have a nice big button on this form called, "Update", which syncronises the replication with the design master, using the following VB:
dbs.Synchronize "n:\db\alpha.mdb", dbRepImpExpChanges
This works great. However, I'm having trouble getting through to the users of the database the importance of "updating" and they keep forgetting.
Consequently, I want to write some code into the Form_Open or Form_Load, so that it will import and export any changes to the database every time the switchboard opens.
The only problem I have with this is that if I put similar code to that listed above, then when I open the design master (which is alpha.mdb) it would throw a wobbler as it tried to synchronise with itself.
I would like to write an If statement that checks to see if the database in use is the design master, or if this is not possible, if the database is called "alpha.mdb"
Can anyone give me some hints as to what the code would look like.
Sorry for the long windedness of this post
Mike
I'm not sure whether this question should have gone in the VBA page, but rather than spam the place I'll just leave it here
I have a replicated database. It autoloads the switchboard form on opening. I also have a nice big button on this form called, "Update", which syncronises the replication with the design master, using the following VB:
dbs.Synchronize "n:\db\alpha.mdb", dbRepImpExpChanges
This works great. However, I'm having trouble getting through to the users of the database the importance of "updating" and they keep forgetting.
Consequently, I want to write some code into the Form_Open or Form_Load, so that it will import and export any changes to the database every time the switchboard opens.
The only problem I have with this is that if I put similar code to that listed above, then when I open the design master (which is alpha.mdb) it would throw a wobbler as it tried to synchronise with itself.
I would like to write an If statement that checks to see if the database in use is the design master, or if this is not possible, if the database is called "alpha.mdb"
Can anyone give me some hints as to what the code would look like.
Sorry for the long windedness of this post
Mike