zariazakeryzavien05
New member
- Local time
- Today, 05:30
- Joined
- Jul 22, 2009
- Messages
- 2
I am using the where condition when opening a report. I am using referring to the control in order to pass the criteria, but get a msg that says incorrect data type. It is a text field with info like this (00166), but it works fine when I hard code it. Example below.
docmd.open report , me.openarg,,"[UIC]=" & forms!frmSelectionSite!cmbSite.column(1) (this doesn't, but once I debug, value for forms!frmSelectionSite!cmbSite.column(1) shows 00166)
docmd.open report , me.openarg,,"[UIC]='00166'" (this works)
docmd.open report , me.openarg,,"[UIC]=" & forms!frmSelectionSite!cmbSite.column(1) (this doesn't, but once I debug, value for forms!frmSelectionSite!cmbSite.column(1) shows 00166)
docmd.open report , me.openarg,,"[UIC]='00166'" (this works)