Hi,
I have a problem. I have a main report that is calling a secondary report. I want the secondary report to only return records from a certain catalog. So, I'm applying a filter when I'm opening my secondary report.
This is the statement I have
in the main report that is calling the secondary report.
DoCmd.OpenReport "Parts ListSubReport", acViewPreview, "[Catalog.Catalog]= " & strCatalog
strCatalog is a global variable I declared in my
Utilities script. I set it equal to a record on my main
report.
In the open report event of the secondary report I have this code:
DoCmd.ApplyFilter , "[Catalog.Catalog] = " & strCatalog
No, no matter how many variations on this I've tried
I always receive the message, "Datatype mismatch
in criteria expression."
Does anyone know why this is happening? Is there anything wrong with my logic or syntax? I'm actually supposed to deliver this to a client today and I desperately need to finish this piece.
If anyone doesn't seem anything wrong, can you make a recommendation for another way to handle this?
Thanks,
Talapia
I have a problem. I have a main report that is calling a secondary report. I want the secondary report to only return records from a certain catalog. So, I'm applying a filter when I'm opening my secondary report.
This is the statement I have
in the main report that is calling the secondary report.
DoCmd.OpenReport "Parts ListSubReport", acViewPreview, "[Catalog.Catalog]= " & strCatalog
strCatalog is a global variable I declared in my
Utilities script. I set it equal to a record on my main
report.
In the open report event of the secondary report I have this code:
DoCmd.ApplyFilter , "[Catalog.Catalog] = " & strCatalog
No, no matter how many variations on this I've tried
I always receive the message, "Datatype mismatch
in criteria expression."
Does anyone know why this is happening? Is there anything wrong with my logic or syntax? I'm actually supposed to deliver this to a client today and I desperately need to finish this piece.
If anyone doesn't seem anything wrong, can you make a recommendation for another way to handle this?
Thanks,
Talapia