Help Pls - 1 Combo box and 1 Date Field on a form to create a repo

T

TxBlueEyes

Hi to all you wonderful ACCESS Guru's - I am definitely missing something...
I want a user to be able to create and view the report by the Team Lead they
choose from the combo box and a Date field
I have the combo box on a form with a "Run Report" command button - the
Combo Box is pulling from a "Team Leads" Table that houses all the Team
Lead's names. I want the "Run Report" to open up the "Y-T-D Team Lead Report
filtered by the choice the user made in the "cboteamlead" combo box...
Also, is there a way on the same form to have a date field based on a the
same query the Report feeds off of.. Date field name is "Monitor Date" from
table called "TEAM LEAD Track"... If so then the report could run based on
the "Team Lead Name and Monitor date"... Below is the vb code I did for the
"Run Report" Command Button, I havent added the Monitor Date yet, I wasn't
sure where to add it to the code.. So any help or suggestions would be
greatly appreciated... TxBlueEyes...
Below is the VB CODE so far...
DoCmd.OpenReport "Y-T-D Team Lead Report", View:=acPreview, _
WhereCondition:="[TEAM LEAD]= '" & Me.cboteamlead & ""
 
W

Wayne-I-M

Same answer as above ??
*************************
DoCmd.OpenReport "Y-T-D Team Lead Report", View:=acPreview, _
WhereCondition:="[TEAM LEAD]= '" & Me.cboteamlead & ""


DoCmd.OpenReport "Y-T-D Team Lead Report", acViewPreview, "", "[TEAM
LEAD]=[Forms]![Form Name]![Combo Name]", acNormal

Change Form Name and Combo Name to what you use in your aplication

Make sure the TEAM LEAD is on your report and it is the same as the bound
column of your combo



If you want to add a date criteria you should have something on your form
with a date - the date should also be in the details section of the report

Something like this
DoCmd.OpenReport "Y-T-D Team Lead Report", acViewPreview, "", "[TEAM
LEAD]=[Forms]![Form Name]![Combo Name]"And [Date in report]=[Forms]![Form
Name]![Date in form]", acNormal

There is a better way to do this. Use a query by form. Base the report on
a query. In the TEAM LEAD and date column use the form field as the criteria.

Just a thought

Hope this helps

--
Wayne
Manchester, England.



TxBlueEyes said:
Hi to all you wonderful ACCESS Guru's - I am definitely missing something...
I want a user to be able to create and view the report by the Team Lead they
choose from the combo box and a Date field
I have the combo box on a form with a "Run Report" command button - the
Combo Box is pulling from a "Team Leads" Table that houses all the Team
Lead's names. I want the "Run Report" to open up the "Y-T-D Team Lead Report
filtered by the choice the user made in the "cboteamlead" combo box...
Also, is there a way on the same form to have a date field based on a the
same query the Report feeds off of.. Date field name is "Monitor Date" from
table called "TEAM LEAD Track"... If so then the report could run based on
the "Team Lead Name and Monitor date"... Below is the vb code I did for the
"Run Report" Command Button, I havent added the Monitor Date yet, I wasn't
sure where to add it to the code.. So any help or suggestions would be
greatly appreciated... TxBlueEyes...
Below is the VB CODE so far...
DoCmd.OpenReport "Y-T-D Team Lead Report", View:=acPreview, _
WhereCondition:="[TEAM LEAD]= '" & Me.cboteamlead & ""
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top