Access 2007, back end SQL Server 2008. It is easier to show you my code then try to explain it.
Code:
Private Sub EntityID_DblClick(Cancel As Integer)
Dim intEntityID As Integer
Dim intNewID As Integer
intEntityID = [Forms]![Property]![PropertyEntityJoin].[Form]![EntityID] 'gets the primary key that you want to find in EntityFRM.
DoCmd.OpenForm "EntityFRM" 'Opens EntityFRM
Me.EntityID.SetFocus 'sets the focus on the field EntityID in the EntityFRM
intNewID = DLookup("EntityID", "dbo_entity", "EntityID = " & intEntityID & "") 'Finds and confirms that the EntityID that I want to find actually exists and returns it to the variable Dim intNewID As Integer
DoCmd.FindRecord Here is where I get in trouble. I have the primary key of the record I want to display but I don't know how to find and display it. This should be easy.
End Sub
I can't seem to find the proper way to display the record.
Thanks,
Fred