Multi-User Error

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
 
P

Paul Shapiro

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top