The solution listed by orange gave me a Data Type mismatch in criteria expression (runtime error 3464) Because i had field in there that was a number type field and i did not specify that. I will figure out how to set the number type field and retry the code from orange.
However, I was able to get it to work with this code
Code:
Dim strDocName As String
Dim strLinkCriteria As String
Dim strLinkCriteria1 As String
Dim strLinkCriteria2 As String
strDocName = "frmInvoices"
strLinkCriteria1 = "[InvoiceNumber]=" & "'" & Me.[InvoiceNumber] & "'"
strLinkCriteria2 = "[CarNumber]=" & Me.[CarNumber]
strLinkCriteria = strLinkCriteria1 & " AND " & strLinkCriteria2
'Debug.Print "Resolved String = " & strLinkCriteria
DoCmd.OpenForm strDocName, , , strLinkCriteria
The debug is just in there for when i was testing