Set a variable to a table field object

A

accesswanabe

How can I set an object variable that refers to a specific table field (not
it's value) to be used in my DAO code?

Thanks!
 
J

John Spencer

Dim vFld as DAO.Field

Set vFld = CurrentDB.TableDefs("SomeTableName").Fields("someFieldName")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
A

accesswanabe

Thanks, John! I really appreciate your help!

John Spencer said:
Dim vFld as DAO.Field

Set vFld = CurrentDB.TableDefs("SomeTableName").Fields("someFieldName")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top