access lookup field properties in code

D

Dmitry

I wand to set up a lookup field in a table using code. Does anybody know how
to access Field properties (like 'Display Control', 'Row Source', etc)
programmatically?

Thank you and best regards
Dmitry
 
J

Jeff Boyce

Dmitry

You may want to scan through the tablesdbdesign newsgroup. There's a strong
consensus that use of the "lookup" data type field in tables can be
confusing and misleading, and probably shouldn't happen.

Jeff Boyce
<Access MVP>
 
M

Marshall Barton

Dmitry said:
I wand to set up a lookup field in a table using code. Does anybody know how
to access Field properties (like 'Display Control', 'Row Source', etc)
programmatically?


While I definitely agree with Jeff, It can be done. The
trick is that your code must create the properties because
they don't exist in JET, they're custom properties that the
Access table design UI creates.

For that matter, why bother doing this in VBA? Creating
fields in a table is clearly a design time activity that is
easier done once in the table design view. Furthermore,
making table fields look pretty is a waste of time because
you should never allow users to see a table's raw data,
forms/reports are the UI mechanisms for presentation and
interaction with the data.
 

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