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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding mulitple fields in a query 1

Status
Not open for further replies.

intrepidtechie

Programmer
Nov 6, 2004
27
0
0
US
I know this sounds really simple but I am a access novice

I have a query that is supposed to remove 000s from a column and this is the way it is.

UPDATE Table_000 SET account_number = Format(account_number, "#")

I want to add one more column name to this query to perform the same function.
Table name is Table_000. I have 2 fields in the table Account_Number and Customer_Number which has extra precedding 000s that I need to remove.
How do I add Customer_Number also to this query in order to make it work so I can fix 2 columns in one query.

Thanks in advance.
 
intrep,
in your query grid, in a blank space in "field" type;
=format(customer_number,"#")
You can do most anything this way. If you want to name the field just change the "Exp1:" to whatever you want. "removedzeros:", "NO ZEROS:","Acct Num:" (enter name of field without quotes.)
jim
 
How are ya intrepidtechie . . . . .

In query design view, goto SQL view and paste over whats there with the following:
Code:
[blue]UPDATE Table_000 SET account_number = Format(account_number, "#"), Customer_Number = Format(Customer_Number, "#");[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top