output of query to come as a report??

  • Thread starter Thread starter Shivalee Gupta via AccessMonster.com
  • Start date Start date
S

Shivalee Gupta via AccessMonster.com

i have a form. inside the form i have a text box & a command button. the command button runs a query based on the value user puts inside the text box. i need to see the ouput as a report, right now, as it is based on a query,it is coming as a query output.
can i do it with access, meaning without code? if not...can someone tell me the code??

Please ,please help me soon.
thanks to everyone...
 
Create a report that is based on your query. Have the command button open
the report rather than the query.
 
but my query is an parameter query? so how will i base my report on a value a user is entering?
 
i dont think you understood.
here it is:
i have a form. inside it i have a combo box and a command button.combo box is related to a column in a table. when user selects any value from the combo box, and clicks on the command button, the command button intern runs a query which looks like this:

SELECT DISTINCT [agr_name]
FROM agr_users
WHERE uname=[Forms]![MAIN FORM]![Combo6];
now you see, the value for the query is coming from the combo-box selected value.
when the query runs, it shows me a list of rows pertaining to the condition. i need a button to convert this output into a report format so it is more readable and more visible and of course printable.
how do i write a code in report? how do i let a user choose a value as i do in combo box in a report?
please be clear as i am a new programmer.
please help.
thanks & regards,
shivalee
 
Set your report's record source property to:
SELECT DISTINCT [agr_name]
FROM agr_users
WHERE uname=[Forms]![MAIN FORM]![Combo6];
Then have the command button open the report.
 
thank you very much for your answer. just one question- where is report's record source property ? i click on create report i design view > new. then i choose a query as a base. i am not seeing report's record source property in the event block as i see in the form.
please help.
shivalee
 
The record source is generally what you selected when "choose a query as a
base". This is a Property of the report and displays in the report
properties dialog (exactly like a form).
 
ya i got it myself. i right clicked on the grey portion in the report and i could see record source. thanks Duane Hookom.
regards,
shivalee
 
thanks a lot Duane Hookom to have helped me in this question.
thanks again,
regards,
shivalee
 
Back
Top