A family of Microsoft relational database management systems designed for ease of use.
Help Creating a Button to Open Subform
Hi,
Can someone help me create a button that will open my subform? Access creates the links between the parent and the child form if it is embedded directly on the parent form, but I wanted to create a button that will only open the subform if the user clicks on the button. I tried using what access provided through the button wizard, but it's not working properly.
On Error GoTo Err_AliasButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AliasForm"
stLinkCriteria = "[MemberID]=" & Me![MemberID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_AliasButton_Click:
Exit Sub
Err_AliasButton_Click:
MsgBox Err.Description
Resume Exit_AliasButton_Click
Thanks!
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.