BASIC, but can't sort it!

coos

New member
Local time
Today, 04:02
Joined
Nov 11, 2003
Messages
8
Fairly simple one, but I can't crack it!

I've got an accounts program, in which a user can insert prices of services.

The resultant table is like so:

customer_number cost
1 £20.00
2 £35.00

etc...

that was already sorted by someone else, (I foolishly volunteered to tweak the application for a friend!) and I somehow managed to create a query, outputtin the grand total of the table (i.e. £55.00 in this example)

Still with me so far? :)

Right. Then, in a form, Access (running locally, btw) displays the table above as individual rows.

My friend has asked if I can dicsplay the cost total at the bottom of the page.

The Control Source of the text box I think I can use is

'=[Daily SERVICE Query]![Repair_cost_total]'

where 'Daily' is the name of the query, 'SERVICE' is the name of the table and 'Query' should be obvious.

'Repair_cost_total' is the name of the column containing £55.00 (in this example) but I'm pretty sure it's the syntax that's not working, because when I run the file, the result is '#Name?'

WHAT AM I DOING WRONG?

Many thanks in advance...

Access Beginner!

:(
 
sorry, that table was:

customer_no..............cost
........1.......................£20.00
........2.......................£35.00

if that wasn't obvious!

:)
 
coos said:
The Control Source of the text box I think I can use is

'=[Daily SERVICE Query]![Repair_cost_total]'

where 'Daily' is the name of the query, 'SERVICE' is the name of the table and 'Query' should be obvious.

Sorry, but that makes absolutely no sense. :rolleyes:

If the form's RecordSource is set to the query you want to use then:

if the query does the total for you: in the ControlSource of the textbox, select the name of the field with the total and that's it.

if the query returns the records as you have highlighted you can set the ControlSource of the textbox to be: =Sum([MyField]) where MyField is the name of your field.
 
st*r, amte! Thanks for your time...

I'll give it a try and probably get back to you!
 
heh heh!

Can you tel I wrote the last post in a rush?

Yeah, that worked fine... thanks mate!
 

Users who are viewing this thread

Back
Top Bottom