hi there,
i do appreciate the tips and efforts of all who respond to the questions posed everyday. This is a great site.
Now, i've got a form where the user enters a client_num and that's it. Then upon hitting enter, i would like to see the client_num and client_name showing up in a second form, along with the rest of related data in the subform which is within the second form.
here is the code that i have been trying.
Private Sub cmdOpenEntryScreen_Click()
On Error GoTo Err_cmdOpenEntryScreen_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ENTRY FORM"
stLinkCriteria = "CLIENT_NUMBER"
stLinkCriteria = "([CLIENT_NUMBER])= '" & Me![txtClientNumber] & "'"
'Me.Bookmark = Me.RecordsetClone.Bookmark
'DoCmd.OpenForm stDocName, , , stLinkCriteria
'txtClientNumber = ""
Forms.stDocName.Form![CLIENT_NUMBER] = Me![CLIENT_NUMBER]
Exit_cmdOpenEntryScreen_Click:
Exit Sub
Err_cmdOpenEntryScreen_Click:
MsgBox Err.Description
Resume Exit_cmdOpenEntryScreen_Click
End Sub
The code that i have commented out was what i first tried to use (along with the code above it). The line "Forms.stDocName.Form![CLIENT_NUMBER] = Me!" was another try to solve this.
Your help is greatly appreciated. Thanks.
i do appreciate the tips and efforts of all who respond to the questions posed everyday. This is a great site.
Now, i've got a form where the user enters a client_num and that's it. Then upon hitting enter, i would like to see the client_num and client_name showing up in a second form, along with the rest of related data in the subform which is within the second form.
here is the code that i have been trying.
Private Sub cmdOpenEntryScreen_Click()
On Error GoTo Err_cmdOpenEntryScreen_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ENTRY FORM"
stLinkCriteria = "CLIENT_NUMBER"
stLinkCriteria = "([CLIENT_NUMBER])= '" & Me![txtClientNumber] & "'"
'Me.Bookmark = Me.RecordsetClone.Bookmark
'DoCmd.OpenForm stDocName, , , stLinkCriteria
'txtClientNumber = ""
Forms.stDocName.Form![CLIENT_NUMBER] = Me![CLIENT_NUMBER]
Exit_cmdOpenEntryScreen_Click:
Exit Sub
Err_cmdOpenEntryScreen_Click:
MsgBox Err.Description
Resume Exit_cmdOpenEntryScreen_Click
End Sub
The code that i have commented out was what i first tried to use (along with the code above it). The line "Forms.stDocName.Form![CLIENT_NUMBER] = Me!" was another try to solve this.
Your help is greatly appreciated. Thanks.