run time error 3464

mana

Registered User.
Local time
Today, 09:49
Joined
Nov 4, 2014
Messages
265
Hello

i have a form that i attached it.
when i select a number from this combobox a report is opened that i want to print it and auftragnummer in this report should be equal to the value of this combobox. i wrote the below code for the report opening but i get this error:
run time error 3464, type mismatch.
i have error in below code:


DoCmd.OpenReport "rep_CQAReport", acViewPreview, , "[Auftragsnummer] = " & [cmb_AuftragNummer]

can you help me please?
thank you
 

Attachments

  • Unbenannt.jpg
    Unbenannt.jpg
    87.4 KB · Views: 111
Are you sure that Auftragsnummer is a number field type?
Else add a ' before and after
[cmb_AuftragNummer].

Code:
[COLOR=red][COLOR=Black]DoCmd.OpenReport "rep_CQAReport", acViewPreview, , "[Auftragsnummer] = [B][COLOR=Red]'[/COLOR][/B]" & [cmb_AuftragNummer][/COLOR][/COLOR][COLOR=red][COLOR=Black][B][COLOR=Red] & "'"[/COLOR][/B][/COLOR][/COLOR]
 

Users who are viewing this thread

Back
Top Bottom