Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Table Display Control and Row Source 1

Status
Not open for further replies.

sabloomer

Technical User
Aug 8, 2003
153
US
I am working on a project where I am given import templates in Excel (Field Name, Size, Field Type, Valid Entries, and Notes) and I have to create an Access table that matches it so people can start entering data and ultimately import that data into our new accounting system. I can use code to make the table with the names, types, and sizes I need, but I cannot figure out how to use code to change the DisplayControl, RowSourceType, and RowSource. I want to take the Valid Entries section and use it to limit data entry to just these types without having to touch each one by hand. My goal was to change the DisplayControl to ComboBox, RowSourceType to ValueList and then set the RowSource to a list of the valid entries.

I have almost 200 import templates to work with and each one has 5 to 10 fields that have restricted values. That is a lot of manual work. I found article but I couldn’t get it to work.

Thank You,

sabloomer
 
Not sure if I follow 100% but,

Me.combo.RowSourceType = "Value List"
Me.combo.Rowsource = "Canada;USA;Egypt;Peru
 
Zion7,

Can you do that directly to the table instead of a combo box on a form?

Thanks for the help,

sabloomer
 
I don't believe so...?

I don't think DAO or ADOX specifies controls,
when creating fields.
Simply constraints, sizes, nullables indexes etc...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top