D
dbl
Hi I have the following code in my form Incident Data Entry:
Dim Docname As String
Dim LinkCriteria As String
Me.Form.AllowEdits = True
DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD, , A_MENU_VER20
Me.Form.AllowEdits = False
Docname = "Confirmation of Events"
LinkCriteria = "[CustomerID] = Forms![Incident Data Entry]![Field143]"
DoCmd.OpenForm Docname, , , LinkCriteria
9 times out of 10 it opens the correct record in form Confirmation of Events
but sometimes in opens the form in the wrong record which is causing major
problems
any help would be very much appreciated.
Thanks Bob
Dim Docname As String
Dim LinkCriteria As String
Me.Form.AllowEdits = True
DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD, , A_MENU_VER20
Me.Form.AllowEdits = False
Docname = "Confirmation of Events"
LinkCriteria = "[CustomerID] = Forms![Incident Data Entry]![Field143]"
DoCmd.OpenForm Docname, , , LinkCriteria
9 times out of 10 it opens the correct record in form Confirmation of Events
but sometimes in opens the form in the wrong record which is causing major
problems
any help would be very much appreciated.
Thanks Bob