Open report from combobox value with specific record

bekward

Registered User.
Local time
Today, 17:17
Joined
Jan 15, 2014
Messages
11
I have one table with some info about my clients, I have a form, where I must choose this clients from combobox and then after clicking button Print must open report with info about specific (chosen from combobox) client and some another texts that doesn't change. Final result must be printed report as invoice.
I can't create report with only specific record information.
Can someone help? :)
 
You must request assistance in more detail.
Provide data structure and sequence. In most cases you'll be able to answer your own question by learning to fully ask these questions.

for example:

I have a table that contains data on my clients.
My form has a combo box that displays [field1] of my clients.
After clicking print. I wish to capture the selected [field1] from that combo box and load a report based on [field2] (could be the same as [field1] but we don't know if you wish to load on the selected value or another value based on that)

You full question is how do I open a report with a filter parameter that specifies which client's data is to be displayed on the report.
 
You full question is how do I open a report with a filter parameter that specifies which client's data is to be displayed on the report.

You are right, that's what I meant, but wrote something different, sorry.
Can you please help me "to open this door"?
 
Use a Filter or a Where clause when you open the report:
Code:
[B]If YourFieldNameFortheClient contain a text value then:[/B]
DoCmd.OpenReport "YourReportName", , ,"YourFieldNameFortheClient='" & Me.YouComboBoxName & "'"

[B]If it is a number then:[/B]
DoCmd.OpenReport "YourReportName", , ,"YourFieldNameFortheClient=" & Me.YouComboBoxName
 

Users who are viewing this thread

Back
Top Bottom