Summary Form/Home Page - text boxes values from multiple queries (1 Viewer)

mcclunyboy

Registered User.
Local time
Today, 02:53
Joined
Sep 8, 2009
Messages
292
Hi,

I am currently developing a database to provide a friend with an auction tracking and ordering system.

I will have a number of questions the first is related to the Home Page/Dashboard/Summary form I am creating. I basically have a few sections, one of which is a combo box offering the user to select an auction to view in the summary section. This summary section contains the list of lots but I also hope to to expand on this and create multiple text boxes, each containing the answer to a number of queries (totals etc).

I have written all the queries and can see the results however as the form does not have a record source I would like to know how to make each text box populate with the result of different queries (ideally in vb - I am using ms access 2010)?

I have tried a few things, control source doesn't apply as I have no record source (i guess). I investigated Dlookup/Dcount but am unsure if these apply for the same reason. I understand I am likely to need a recordset etc in vb and have already tried a few things but unfortunately none of them work. If someone could advise I would appreciate it.
 

mcclunyboy

Registered User.
Local time
Today, 02:53
Joined
Sep 8, 2009
Messages
292
Got it working...

As long as your query returns only one value this is fine...otherwise ask for more help...

-> Add query, in my case I require a few counts/totals of other tables..
-> Add text box to form...
-> Amend control source of textbox to =Dlookup("[query result column name]","[query]")
-> In my case, my query is built from a combo box selection - I add the vb "me.txtbox.requery" to refresh the query result when the selection is changed

Hope this may help someone - if there is a better way to do it, please let me know (I would like to know how to do it all in vb).
 

Users who are viewing this thread

Top Bottom