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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access thinks it's working in a multi-user environment

Status
Not open for further replies.

rdagey

Programmer
Oct 1, 2002
2
0
0
US
I am getting an error message stating that Access has stopped the process (in this case printing a report) because another user has attempted to change the data I am changing.

There is only user. There is one copy of the database that I work on. The copy gets passed back and forth, via the network, to my manager's machine. She uses the fixes that I make, but the database file is not shared or opened via the network.

I am printing a report which uses a table where a field, list, is defined as a Memo field. When the print button for a form is pressed, the list field is updated based on the parts which have been entered into the order form.

I open the table as dbOpenDynaset and set it to a recordset object. I use rec.edit
rec!
  • = make_list()
    rec.update

    to update the list field. make_list() returns a string which is the list of parts on the current order.

    The list field is displayed on the report along with other order information.

    When I open the table, the record corresponding to the current order has its list field set to #Error. In the past, this field has been #deleted, and this also threw out screwy user-based errors. I was able to fix this by swapping a call to save the system and the making of the list.

    This problem occurs for particular orders--aka, one order may work and another fail. I have tried to recreate the error myself, but my have been unsuccessful and therefore I do not know what my manger is doing to create this error (she does not keep good records of actions). Note that she is not into the coding, only the implementation of the system.

    Here is my print previewing sub:

    Private Sub preview_Click()
    On Error GoTo Err_preview_Click
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

    Dim stDocName As String
    Dim db As Database, rec As recordset

    Set db = CurrentDb
    Set rec = db.OpenRecordset("invoice", dbOpenDynaset)
    rec.FindFirst ("[invoice__] = " & Str$([INVOICE__]))
    rec.Edit
    rec!
    • = make_list()
      rec.Update
      rec.Close

      stDocName = "invoice"
      DoCmd.OpenReport stDocName, acPreview

      Exit_preview_Click:
      Exit Sub

      Err_preview_Click:
      MsgBox err.Description
      Resume Exit_preview_Click

      End Sub

      Any help with this problem would be grealtly appreciated.
 
rdagey,

Try closing the recordset and setting the db to nothing. I had a similar problem just recently.

Thanks,
crpjaviman [rockband]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top