S
Sue
Hello,
I'm working with Access 2000
I have a continuous subform containing buttons that brings up an
additional information form not included on the continous subform. I have
managed to make this work in a past database, but can't remember how.
Currently when I click the button on the subform I get an enter parameter
value popup box.
The form is called Orders
The Subform is called MTsf
The form the button is supposed to open is AccessionDetails
MTsf and AccessionDetails are linked by the field MTAID
The subform (MTsf) and the main form (Orders) are lined by the field called
OrderID
I can get the button working on the subform if it's opened as a form (and
not a subform) but I can't get it to work on the a subform. Also if I fill in
the MTAID value into the enter parameter value popup it works fine.
The click command code I'm using is
Private Sub Command33_Click()
On Error GoTo Err_Command33_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AccessionDetails"
stLinkCriteria = "Forms![Orders]![MTsf].Form![MTAID]=" & Me![MTAID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command33_Click:
Exit Sub
Err_Command33_Click:
MsgBox Err.Description
Resume Exit_Command33_Click
End Sub
Any suggestions people have to fix this problem would be appreciated.
I'm working with Access 2000
I have a continuous subform containing buttons that brings up an
additional information form not included on the continous subform. I have
managed to make this work in a past database, but can't remember how.
Currently when I click the button on the subform I get an enter parameter
value popup box.
The form is called Orders
The Subform is called MTsf
The form the button is supposed to open is AccessionDetails
MTsf and AccessionDetails are linked by the field MTAID
The subform (MTsf) and the main form (Orders) are lined by the field called
OrderID
I can get the button working on the subform if it's opened as a form (and
not a subform) but I can't get it to work on the a subform. Also if I fill in
the MTAID value into the enter parameter value popup it works fine.
The click command code I'm using is
Private Sub Command33_Click()
On Error GoTo Err_Command33_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AccessionDetails"
stLinkCriteria = "Forms![Orders]![MTsf].Form![MTAID]=" & Me![MTAID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command33_Click:
Exit Sub
Err_Command33_Click:
MsgBox Err.Description
Resume Exit_Command33_Click
End Sub
Any suggestions people have to fix this problem would be appreciated.