Hi,
Most of my users use Access 2003 and there are no problems with it but one user has Access 2002 and when he goes to open a form thats already open it crashes the database.
Basically I have a continuous form with a list of instruments and when the user clicks on the button beside one it opens a form with the full details on that instrument. If they click on another button the form with the detailed instrument data just jumps to the correct record. But on Access 2002 this causes the db to crash.
I would prefer not to close the open form then reopen it with the correct data as it is quite slow to open in any case. I have written the following code to try jumping to the correct record if the form is loaded but I keep getting the "Record not found" message. Maybe I have referenced it incorrectly?
Or maybe there is a better way of doing this?
Most of my users use Access 2003 and there are no problems with it but one user has Access 2002 and when he goes to open a form thats already open it crashes the database.
Basically I have a continuous form with a list of instruments and when the user clicks on the button beside one it opens a form with the full details on that instrument. If they click on another button the form with the detailed instrument data just jumps to the correct record. But on Access 2002 this causes the db to crash.
I would prefer not to close the open form then reopen it with the correct data as it is quite slow to open in any case. I have written the following code to try jumping to the correct record if the form is loaded but I keep getting the "Record not found" message. Maybe I have referenced it incorrectly?
Code:
If IsLoaded(stDocName) = True Then
Set rs = Forms!frmEditInstr.RecordsetClone
rs.FindFirst "ComponentID = " & Me![ComponentID]
If rs.NoMatch Then
MsgBox "Record not found"
Else
Forms!frmEditInstr.Bookmark = rs.Bookmark
End If
rs.Close
Else
stLinkCriteria = "[ComponentID]=" & Me![ComponentID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Or maybe there is a better way of doing this?