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

Access field name extraction 1

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi,

After I import the Excel spreadsheet into new Access table, keeping the excel columns as the Access fields name, I want to be able to find out the names of the fields.

Say for instance, I know for sure that one field name will have the following name "Pages/MO Feb. 2003"...but I will also have the field "Pages/MO March. 2003".
Is there the way to extract the part of the field's name or use LIKE key word to find out if the certain string is in the field's name

I will appreicate any tips on that.

Thanks.
 
How (or better yet, where) do you want to use the field names?

In a query? In a form? In some VB Code?
 
You can get field names from field objects, e.g.

Dim MyRst as recordset
set myrst = ....


Dim CurField as field
for each curfield in myrst.fields
debug.print curfield.name
next curfield

hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top