Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If ? 1

Status
Not open for further replies.

mollow

MIS
Aug 7, 2001
20
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top