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

Combining 3 fields of different types in an update query

Status
Not open for further replies.

tbac

Technical User
Jun 16, 2003
59
US
I want to use an update query to update a field that combines 3 fields. 2 of the fields are text fields and one numerical field. I tried: [CountryID]+[AgreementTypeID]+LTrim(Str([AgrID])). But the update query doesnt recognize LTrim or Str. What am I doing wrong?
 
are you trying to sum them? Or concantonate them? Please give sample data.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
concantonate to create an entry like: AUFP19 ('AU' from CountryID, 'FP' from AgreementTypeID,and '19' from AgrID. But the update query will not let me combine the two text fields with the numerical field.
 
It shouldn't matter that it's a numeric field. Are you getting an error message? What is your output?

How about this:
Code:
=[CountryID] & [AgreementTypeID] & [AgrID]

Also, maybe one of your references is MISSING so it's not able to read those functions. In a code module, go to the menu TOOLS+RERERENCES and see if anything is MISSING. If it is, uncheck it.

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

Part and Inventory Search

Sponsor

Back
Top