AccessVB: DoCmd.Openform
Hello,
I'm having an issue trying to load a form based on 2 text boxes. Here is the code I'm currently using:
Dim stDocName As String
Dim stLinkCriteria As String
Dim stLinkCriteria1 As String
stDocName = "frm_Prod_Entry"
stLinkCriteria = "[Date]=" & "#" & Me![Combo11] & "#"
stLinkCriteria1 = "[Shift]=" & "'" & Me![Combo16] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria And stLinkCriteria1
I receive a type mismatch error I believe because the And is putting the two together. Is there a way to use two variables to load a specific form record?
Thanks,
Andy
|