data-type mismatch...Why am I getting this error???

  • Thread starter Thread starter Angi
  • Start date Start date
A

Angi

I keep getting a 'data-type mismatch' error and I know what it means,
but I don't know why I'm getting it here. I copied the zip control
directly from the report and they're both pulling from the same table,
so why am I getting this error???

My code from the form:

Private Sub cmdZipRpt_Click()
DoCmd.OpenReport "ziprptform", acViewPreview, , "zip = " & Me.Zip
End Sub
 
You zip field is probably text. Try
DoCmd.OpenReport "ziprptform", acViewPreview, , "zip = """ & Me.Zip & """"
 
Duane,
That was it. I thought I tried that, but I think I did it wrong!
Thank you!!!

Angi
 
Back
Top