I have spent most of the day on this and despite searching through the Forum I have not found an answer
stLinkCriteria1 and stLinkCriteria2 work on their own, but when I try to join them to use both the date and text I get a type mismatch....
Oscar
stLinkCriteria1 and stLinkCriteria2 work on their own, but when I try to join them to use both the date and text I get a type mismatch....
Code:
stDocName = "Operations_By_Unit"
testdate = Date
testdate = Format(testdate, "MM/DD/YYYY") ' Converts date format to US for Findfirst
stLinkCriteria1 = "[StartDate] = #" & testdate & "# "
stLinkCriteria2 = "[Unit] = " & Chr(34) & Me!CboUnit & Chr(34)
stLinkCriteria3 = ("[StartDate] = #" & testdate & "# ") And ("[Unit] = " & Chr(34) & Me!CboUnit & Chr(34))
Me.Undo
DoCmd.Close acForm, "PreOpen"
DoCmd.OpenForm stDocName, , , stLinkCriteria3
Oscar