How to create Form Letter using query (1 Viewer)

Z

ztsyed

Guest
Hi, i need to write a form letter based on query. I need to pass a parameter to the query before actually writing the report.
 

Jack Cowley

Registered User.
Local time
Today, 15:57
Joined
Aug 7, 2000
Messages
2,639
I am not exactly sure what your question is. A bit more detail would help....
 
Z

ztsyed

Guest
I've to pass parameter to a query, which is used to write report (letter). Now the problem is that the query prompts for parameter with a textbox with the label of parameter name. Instead of textbox, i would like to present user with the listbox .
Alternatively, can you tell me how can i pass arguments to query using code? (like using listbox on form and then calling report). hope u understand wat i mean here.
 

Neal

Registered User.
Local time
Today, 15:57
Joined
Feb 17, 2000
Messages
116
If you have a form with a listbox or combobox offering the available parameters, you use that box as the criteria in the query. i.e.
forms!YourFormName!YourListBox.
On the After Update event of the listbox or combobox, you write the code to print the report. I.e.
Docmd.OpenReport "YourReportName", acPreview
 
Z

ztsyed

Guest
Thanx Neal!

Finally i got it working


Cheers

Zia
 

Users who are viewing this thread

Top Bottom