access lookup field properties in code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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>
 
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.
 
Back
Top