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

change the caption of a query column using VBA? 1

Status
Not open for further replies.

JOD59

Technical User
Dec 17, 2003
39
US
Is there a way to change the caption of a query column using VBA?
 
How about 'Select flda as Product from tableA ...'

Code: Where the vision is often rudely introduced to reality!
 
Trevil, thanks for your response, but I'm not quite sure what you mean. I'm fairly new to VBA. Could you show me a sample of code? Thanks for any help
 
The following is what you proibably have:
SELECT tbl1.fld1, tbl1.fld2, tbl1.fld3
FROM tbl1
ORDER BY tbl1.fld1;

To rename the columns use:
SELECT tbl1.fld1 AS Customer, [:fld2] AS City, tbl1.fld3 AS State
FROM tbl1
ORDER BY tbl1.fld1;


Code: Where the vision is often rudely introduced to reality!
 
Thanks Worked like a charm!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top