A report from a combo box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone
A simple question : I have 2 reports (payed and not payed) that reads from a
query and one of the fields is the name of the sales man, that also goes to
table of sales man.
What i would like to do is : before it shows me the report, it "asks me" for
the name of the sales man and type of report (a or b).
I think i know how to do it with parameters in the query, but i think it
would be nicer if i show them a combo box.
Tks in advance
Pedro
 
Tks for your effort but that's to dificult for me. I'm not an expert.
If you have any other solution i'll apreciate.
Ty anyway
Pedro

Ofer Cohen said:
Check this link on "Printing the Record on the Microsoft Access Form to a
Report"

http://www.databasedev.co.uk/report_from_form_record.html

If your filter is based on a text field, then change the criteria by adding
a single quote

strCriteria = "[lngSalespersonID]= '" & Me![lngSalespersonID] & "'"


--
Good Luck
BS"D


Pedro said:
Hello everyone
A simple question : I have 2 reports (payed and not payed) that reads from a
query and one of the fields is the name of the sales man, that also goes to
table of sales man.
What i would like to do is : before it shows me the report, it "asks me" for
the name of the sales man and type of report (a or b).
I think i know how to do it with parameters in the query, but i think it
would be nicer if i show them a combo box.
Tks in advance
Pedro
 
Well that was the correct way on doing that, but there is another way.

If this is the RecordSource of the report (example)

Select * From TableName Where [sales man field name] = [Please select a
sales man]

And the ser is prompt with the message "Please select a sales man", then
instead you can reference to the combo in the form in the RecordSource of the
eport

Select * From TableName Where [sales man field name] =
Forms![FormName]![ComboName]


--
Good Luck
BS"D


Pedro said:
Tks for your effort but that's to dificult for me. I'm not an expert.
If you have any other solution i'll apreciate.
Ty anyway
Pedro

Ofer Cohen said:
Check this link on "Printing the Record on the Microsoft Access Form to a
Report"

http://www.databasedev.co.uk/report_from_form_record.html

If your filter is based on a text field, then change the criteria by adding
a single quote

strCriteria = "[lngSalespersonID]= '" & Me![lngSalespersonID] & "'"


--
Good Luck
BS"D


Pedro said:
Hello everyone
A simple question : I have 2 reports (payed and not payed) that reads from a
query and one of the fields is the name of the sales man, that also goes to
table of sales man.
What i would like to do is : before it shows me the report, it "asks me" for
the name of the sales man and type of report (a or b).
I think i know how to do it with parameters in the query, but i think it
would be nicer if i show them a combo box.
Tks in advance
Pedro
 

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

Back
Top