Multi Copies of Database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have multi copies of a database with a BE. The Unique identifier for the
records is an invoice #. The Form allows 2 users to enter in the same
invoice # at once creating a mess. Sometimes it will give an error stating
the number is used and sometimes it allows them to enter the transaction.
Any suggestions?
 
Sharon,

I take it you mean you have a multi-user database with multiple copies
of the FE, one per user, and ONE common BE, right? This is the right way
to do it.

Also, if you are getting conflicts on the Invoice No, I take it this is
not an autonumber field, you are probably increasing the Invoice number
through some function in the entry form?

If this is indeed the case: the problem is that the next invoice number
is calculated as the user enters a new record, and it takes some time
for them to fill in the rest of the fields and try to save it; if,
during this time, another user enters a new record, they calculate the
same invoice number (because the first one's record hasn't been saved
yet, so they both "see" the same last saved number in the table).
Consequently, the second one to try to save their record get a conflict.

The solution is to use an unbound form, with a Save command button,
whose Click event code calculates the Invoice number and saves the
record either (a) through a recordset operation, or (b) through an
Insert Into SQL query. That way, the time window between calculating the
next Invoice number and saving the record is so narrow, that the chances
of another user doing the same during the said time window are next to
nothing.

HTH,
Nikos
 
Back
Top