pbaldy, thanks for the help... what I am trying to accomplish is exactly like that, however, I found a similar tutorial before and alas this one generates the same error. Both Forms use the same table, the primary key of which is known as "[OwnersID]".
I named the field that one clicks on the first form "ID". This field contains the primary key [OwnersID].
Here is the code I using:
Code:
Private Sub ID_Click()
Dim rs As Object
Dim lngBookmark As Long
'set a variable to the current record
lngBookmark = Me.ID
'open the new form
DoCmd.OpenForm "Contact Details"
'take it to the selected record
Set rs = Forms![Contact Details].RecordsetClone
rs.FindFirst "[OwnersID] = " & lngBookmark
Forms![Contact Details].Bookmark = rs.Bookmark
Set rs = Nothing
End Sub
The error I get after clicking is as follows:
The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft Access was communicating with the OLE Server or ActiveX Control.
* The expression may not result in the name of a macro, the name of a user defined function, or [Event Procedure]
* There may have been an error evaluating the function, event or macro.
When I click show help is says
This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.
Any ideas as to what might be causing this error?
Thanks,
Paddon