beenut23
Technical User
- Aug 17, 2008
- 8
hello!
I have a button on a form, which when clicked, opens another form. The code for my button is:
My problem is that it is not putting the value that is in Me.txtCaseID into the CaseID on the form when it opens it. The Debug.Print does work, so it is seeing that value.
Any ideas why it's not working? it's supposed to open to a new record, and plug that CaseID into it.
Thanks much for your help.
I have a button on a form, which when clicked, opens another form. The code for my button is:
Code:
Private Sub cmdOpenDispo_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmDispoForm"
stLinkCriteria = "CaseID=" & Me.txtCaseID
DoCmd.Save
DoCmd.OpenForm stDocName, , , stLinkCriteria
Debug.Print Me.txtCaseID
End Sub
My problem is that it is not putting the value that is in Me.txtCaseID into the CaseID on the form when it opens it. The Debug.Print does work, so it is seeing that value.
Any ideas why it's not working? it's supposed to open to a new record, and plug that CaseID into it.
Thanks much for your help.