Putting very simple query result into form

Toby3

Registered User.
Local time
Tomorrow, 02:15
Joined
Feb 27, 2010
Messages
10
Hello all :)

I have a very simple query that brings back a result of one $ figure.

The queryname is "qryOutstandingBalance"
There are only 3 lines filled
Filed: Total
Table: tblInvoices
Total: Sum

When query is run it brings back table with one column and one row, result is e.g $5782.00. Column name is SumOfTotal.

I am wanting to put that in my Main switchboard (called Main switchboard) form that I have. I have created the textbox and tried various expressions to no avail to bring up that $5782.00 in the box. I am wanting it so when the user opens the database that value should change as its the total amount owed that changes continuously when user has input data.

Any help would very much be appreciated!!!

Edit: Well....I made a sub-form and its now coming up but isnt really what I was wanting as it looks quite ugly on my main switchboard :( Can anyone tell me a different way using a normal textbox?
 
Last edited:
Take a look at the DSUM() function. Just use DSUM as a formula in your text box.

hth
Chris
 
....I made a sub-form and its now coming up but isnt really what I was wanting as it looks quite ugly on my main switchboard :( Can anyone tell me a different way using a normal textbox?

Using a domain function is a good way to return one value. However if you had more boxes it is better to use the subform as you have done because it is far more efficient than multiple domain functions.

You can make subforms completely blend into the main form by removing record selectors and a few other elements from the subform and its associated subformcontrol. Check out the likely looking properties and you will work it out.
 
Yayyyyyyyyyyyyyyyyyyyy

I luv you luuuung time stopher!!! knew I was using the wrong function before dangit!!!

Sorry Galax but this was exactly what I was looking for, I wont be adding to it in the future on this form at least, but others probably!!

Thanks so very much guys!!!
 

Users who are viewing this thread

Back
Top Bottom