I am attempting to open a form from another form with code. I would like to open the form to the appropriate record. The code I have written returns a "Type MisMatch" error. Both fields are text fields.
Here is the code:
StLinkCriteria = "trim([Project]) = '" & Me![CBOProj] & "'"
StLinkCriteria = (StLinkCriteria & " AND ") & "trim([LotNo]) = " & "'" & Me![LotInput] & "'"
DoCmd.OpenForm acForm, "F_Maintain_Job_Options", , , StLinkCriteria
The debug print returns this in the immediate window:
trim([Project]) = 'RH Proj 1' AND trim([LotNo]) = '44444444'
I tried this with and without the trim function