I have code that uses the value of a field on a form to lookup a record inn another table. After the lookup is done, I want it to use and if/then statement to tell me if the box in the record is Null or has a value, and if it has a value I want it to open a form. Any ideas. I was thinking something like this.
Dim db As DAO.Database
Dim ItemFile As DAO.Recordset
Dim look As String
Set db = CurrentDb()
Set ItemFile = db.OpenRecordset("Item File")
look = Me!ItemNumber
If [ItemFile]![CardPassNum] = true Then
DoCmd.OpenForm("Form",acNormal)
On the last line I get a comiler error though, says illegal '=' for the DoCmd.
Any ideas?
Dim db As DAO.Database
Dim ItemFile As DAO.Recordset
Dim look As String
Set db = CurrentDb()
Set ItemFile = db.OpenRecordset("Item File")
look = Me!ItemNumber
If [ItemFile]![CardPassNum] = true Then
DoCmd.OpenForm("Form",acNormal)
On the last line I get a comiler error though, says illegal '=' for the DoCmd.
Any ideas?