Multi-User Error

  • Thread starter Thread starter Melissa
  • Start date Start date
M

Melissa

I recently got multiple errors in my tblComments table after filling out a
form that (using VBA) creates new recordsets in the tblComments table. I'm
afraid it has something to do with the fact that other people were in the
record(s) at the same time. Is there a way to prevent this from happening
again?

Additional Info: the database is a FE and BE setup with each user having
the FE on their own computer. Any help would be most appreciated. Below
is the code I used to update the tblComments table.

Set dbpurchaseorders = CurrentDb
Set rcdcomments = dbpurchaseorders.OpenRecordset("tblComments")
rcdcomments.AddNew
rcdcomments!CommentDate = Me.RevisionDate
rcdcomments!PurchaseOrderNumber = Me.PurchaseOrderNumber
rcdcomments!Notify = Me.Notify
rcdcomments!Comment = strcriteria
rcdcomments.Update
 
It's easier if you tell us what the EXACT errors are, and include the Dim
statements so we can see how rcdComments is declared.

If you're just using this recordset to add a new record, you can use:
Set rcdcomments = dbpurchaseorders.OpenRecordset("Select * From tblComments
Where 1=0")
to get an insertable recordset without any of the existing records.

It looks like you're taking the data from a form? If so, why not use a bound
form or subform and let Access handle the insertions?
 
Back
Top