View Single Post
  #2 (permalink)  
Old September 30th, 2004, 06:54 PM
jmaronilla jmaronilla is offline
Friend of Wrox
 
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

Paul,
Yes, I have done it in most of my forms.
How it works is, you need to have a index field value to
reference the second form record to open.
Code example:

Private Sub Open_Form_Name_Click()
On Error GoTo Err_Open_Form_Name_Click

  Dim strfrm As String
  Dim strWhere As String

  strfrm = "Form - " & [Form_Name]
  strWhere = "ID = " & Me!ID
  DoCmd.OpenForm FormName:=strfrm, WhereCondition:=strWhere

Exit_Open_Form_Name_Click:
  Exit Sub

Err_Open_Form_Name_Click:
  Resume Exit_Open_Form_Name_Click

End Sub

Hope this helps.
John
Reply With Quote