How to create Form Letter using query

  • Thread starter Thread starter ztsyed
  • Start date Start date
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.
 
I am not exactly sure what your question is. A bit more detail would help....
 
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.
 
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
 
Thanx Neal!

Finally i got it working
smile.gif


Cheers

Zia
 

Users who are viewing this thread

Back
Top Bottom