mizenerman
MIS
Hi all. Quick question and I'm sure it's simple but I'm not sure what else to try.
I have a form that is opening another from via a button. The code for the button is as follows:
Private Sub Data_Sheet_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ClinicFrm"
stLinkCriteria = "MRN='" & Me![MRN] & "' AND [Clinic Date_Bound] ='" & Me![Clinic Date] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "Data Sheets", acSaveYes
End Sub
When the ClinicFrm opens prompt box appears "Enter Parameter Value" Clinic Date_Bound (a bound control). I then enter the appropriate date and then it opens to the proper record in the form. I don't want to enter the prompt. What am I missing? Thanks in advance for your help.
I have a form that is opening another from via a button. The code for the button is as follows:
Private Sub Data_Sheet_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ClinicFrm"
stLinkCriteria = "MRN='" & Me![MRN] & "' AND [Clinic Date_Bound] ='" & Me![Clinic Date] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "Data Sheets", acSaveYes
End Sub
When the ClinicFrm opens prompt box appears "Enter Parameter Value" Clinic Date_Bound (a bound control). I then enter the appropriate date and then it opens to the proper record in the form. I don't want to enter the prompt. What am I missing? Thanks in advance for your help.