run query in forms

jerry28ph

jerry
Local time
Today, 14:18
Joined
Nov 16, 2008
Messages
141
hi all,

me again, I learned how to create query on this forum and i am comfortable in doing it thanks for all the help.
I have something to consult to anyone, how can run the query in the form? I want to get the value of Amount in the query and display it in the form.

SELECT tab_sales.desc, tab_sales.qty, tab_sales.price, [tab_sales.qty]*[tab_sales.price] AS Amount
FROM tab_sales;

Please need your help.

Regards,
Jerry
 
add a text box and as its Recordsource use Amount.
 
hi nedkelly,

where can i find the Recordsource, is it in the properties or i should write it in the form? please bear with me, im really newbie in access.
Please can i get the proper code to get this value in the form.

Please help me.
Thanks




add a text box and as its Recordsource use Amount.
 
Yes it is in the Properties box under the Data Tab.

Also the Form itself should have that query in its recordsource.

Failing that use the Wizard to create the form.
 
Got it, thank you so much.

Regards,
Jerry



Yes it is in the Properties box under the Data Tab.

Also the Form itself should have that query in its recordsource.

Failing that use the Wizard to create the form.
 
hi,

can we assign more than 1 recordsource in single form? if possible, can you please teach me the syntax of setting up the recordsource in the form?

Thanks,
Jerry




Got it, thank you so much.

Regards,
Jerry
 
can we assign more than 1 recordsource in single form?

The answer is NO.

What are you trying to do.
 
ok, my situation is I have my main form (called frmPCLog) and I had 5 queries with of course different results (like sum, count, totals etc.). I need to get them and put it all together in each text box within single form and save it in another table to create report. I want to save all the query results in one table for future use. I got a suggestion to use sub forms to link my parent link to child link using common fields.
Please im asking again your help how to facilitate this processing of linking parent to child fields.

I hope you get my point.
Thanks

Best regards,
JErry






can we assign more than 1 recordsource in single form?

The answer is NO.

What are you trying to do.
 
Jerry

Things are getting complicated. This is a good sign that your Tables are not set up correctly. If you would like to post a copy of your Databse here I will have a look at it and try to give some constructive advice.

Your suggestion of storing the results in a new table goes against the norm of Database design. There is a better way.
 

Users who are viewing this thread

Back
Top Bottom