R
Ripper
I am using the following code in the OnClick event to open a report using the
BoxID number that is in the cell.
DoCmd.OpenReport "rptBoxPrintout", acViewPreview, , "BoxID=" & "'" &
Me.BoxID & "'"
Simple right? I keep getting a Run-Time error 3464 Data type Mismatch in
Critera expression.
The field I am clicking is the AutoNumber field in a datasheet view of
tblBoxes. The BoxID is set to auto number. If I use the same code using
BoxName in the BoxName field, no problem (except you can name a box
anything).
I want to make sure the correct report opens and the BoxID is the primary
key. How do I get the report to open up using the primary key? It is
driving me crazy!
BoxID number that is in the cell.
DoCmd.OpenReport "rptBoxPrintout", acViewPreview, , "BoxID=" & "'" &
Me.BoxID & "'"
Simple right? I keep getting a Run-Time error 3464 Data type Mismatch in
Critera expression.
The field I am clicking is the AutoNumber field in a datasheet view of
tblBoxes. The BoxID is set to auto number. If I use the same code using
BoxName in the BoxName field, no problem (except you can name a box
anything).
I want to make sure the correct report opens and the BoxID is the primary
key. How do I get the report to open up using the primary key? It is
driving me crazy!