J
Jeff Conrad
Hi,
Using Access 97 here.
I am completely fed up at the moment.
I have been working on solving this very easy problem
for over an hour and a half and I am no closer.
All I want to do is open a report from an unbound form and restrict the
records to display ALL appointments from the CURRENT DATE for the MANAGER
selected in a text box.
Simple right? Not for me apparently.
I have searched the Help, googled like crazy and my syntax looks correct so
what gives?
By the way, Access Help on the OpenReport method was NO help at all!
This is the ENTIRE example listed in Access 97 for OpenReport Method:
"The following example prints Sales Report while using the existing query
Report Filter:
DoCmd.OpenReport "Sales Report", acViewNormal, "Report Filter"
Oh wow, big help! It doesn't even include an example using the where part!!!
My report's record source is a saved query.
The saved query simply gets the information from the table for the current
date for ALL managers. So there is a where part in the SQL on the date.
If I open the query from the Database Window it opens just fine with no
prompts.
If I open the report from the Database Window it opens just fine with no
prompts.
Here is my latest (of many) syntax currently to open the report:
DoCmd.OpenReport "rptTodaysAppointments", acPreview, , "[UserID]=" &
Me.txtManager
It says "Enter Parameter value - Admin"
Huh????
UserID is text and I have tried countless variations with single quotes and
double quotes.
UserID is not the primary key; an Autonumber is.
Does the Where part only apply to the Primary Key Field?
Can I only use this on a bound form?
Do I have to include the date part as well?
The date field is called TaskDate in the table.
The form control is called txtManager.
Any help would make my day!
Thanks,
Jeff Conrad
Bend, Oregon
Using Access 97 here.
I am completely fed up at the moment.
I have been working on solving this very easy problem
for over an hour and a half and I am no closer.
All I want to do is open a report from an unbound form and restrict the
records to display ALL appointments from the CURRENT DATE for the MANAGER
selected in a text box.
Simple right? Not for me apparently.
I have searched the Help, googled like crazy and my syntax looks correct so
what gives?
By the way, Access Help on the OpenReport method was NO help at all!
This is the ENTIRE example listed in Access 97 for OpenReport Method:
"The following example prints Sales Report while using the existing query
Report Filter:
DoCmd.OpenReport "Sales Report", acViewNormal, "Report Filter"
Oh wow, big help! It doesn't even include an example using the where part!!!
My report's record source is a saved query.
The saved query simply gets the information from the table for the current
date for ALL managers. So there is a where part in the SQL on the date.
If I open the query from the Database Window it opens just fine with no
prompts.
If I open the report from the Database Window it opens just fine with no
prompts.
Here is my latest (of many) syntax currently to open the report:
DoCmd.OpenReport "rptTodaysAppointments", acPreview, , "[UserID]=" &
Me.txtManager
It says "Enter Parameter value - Admin"
Huh????
UserID is text and I have tried countless variations with single quotes and
double quotes.
UserID is not the primary key; an Autonumber is.
Does the Where part only apply to the Primary Key Field?
Can I only use this on a bound form?
Do I have to include the date part as well?
The date field is called TaskDate in the table.
The form control is called txtManager.
Any help would make my day!
Thanks,
Jeff Conrad
Bend, Oregon