HI folks,
I've created a proc that creates a table, then creates fields - as per the snippets below. Of course, the CreateField method has just the three arguments shown in the second snippet. But I've never done the following before:
Is there anyway to modify the new field to have a look up listbox with, in this case, just two values, say "Archibus;Trina"? I don't need list box headers or anything and the user will be allowed to add whatever they want into the field besides the two choices.
In the second snippet below, tbNew is the variable set for the table, i.e.
Code:
Dim db As DAO.Database
Dim tbNew As DAO.TableDef
Set db = Access.CurrentDb
Set tbNew = db.CreateTableDef("Some New Table Name")
This is the part with which I am familiar and works perfectly. Other fields have been left out for clarity.
Just hoping it is possible to add the ???? code:
Code:
with tbNew
.Fields.Append .CreateField("ArchTrina", dbText, 10)
'Next, add listbox look up for the above field...
???????
End With
'Now add the defined table
db.TableDefs.Append tbNew
Thanks in advance for any help or what to look for in the MS documentation.
I hope I've been clear enough. Admonishments are entirely appropriate if I have not.
Thanks in advance,
--
Tim