Jim, are you really sure that you want to do this at the table field level?
In my experience, a control that hides the actual value stored in the table
does nothing useful, and serves only to confuse people about what is really
there.
If you must, you can use DAO to set the field's DisplayControl property. The
basic idea is:
fld.Properties.Append fld.CreateProperty("DisplayControl", dbInteger,
CInt(acComboBox))
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jim Stacey" <og********@yahoo.com> wrote in message
news:9c**************************@posting.google.c om...
Create Lookup field with Visual Basic
Can i create a lookup field on the fly? In my table Students i want to
create a loookup field
TeacherID that looks up teachers by their LastName. Otherwise i use
the Lookup wizard in the
table, then i connect with the table Teachers and then i hide the
teaccherid.
I want to create this lookup field without the help of the wizard.How
can i do it ?