Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating multiple value from 1 row from a database 1

Status
Not open for further replies.

Xenocide

Programmer
Jan 20, 2005
76
CA
Hi

Here's a query string I did:

strSQL =
"SELECT Table850.Depense,Table850.Disponibilité " & _
"FROM Table850 WHERE Table850.Maitre = lst1.Column(0):"

what I would like to do is to add all of the Depense I will get together and the same for the Disponibilité.

I found a way but it require my adding a few control and I would like not to if possible

can you help me?

 
strSQL = "SELECT Sum(Depense),Sum(Disponibilité) " & _
"FROM Table850 WHERE Maitre=" & lst1.Column(0)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
oh my.. I'm stupid.. I'm forgetting the basic -_-'... thanks PHV

btw do you know if there's a way to put a inputmask to a listbox .. for only one of the field in it?
 
a inputmask to a listbox
???
How can you type something in a ListBox ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That's not exactly what I meant

I'll ask in another way :p

I register a data in my database with this mask

00-000000-AA

the same mask is on the textfield in the form where the user input that data

When I get that data back by a listbox it come in this form (let's say I had 04-000000-15) 0400000015

I owuld like it to be 04-000000-15 in my listbox too since I need it written that way.

Is there any way to help about that?
 
Take a look at the Format function:
SELECT Format(yourTextField, '00-000000-AA') AS yourAlias

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top