Change existing text box to combo box

hunterfan48

Registered User.
Local time
Yesterday, 16:53
Joined
Aug 17, 2008
Messages
436
On my form, I have a field that is a text box data type. I want to change it to a lookup field. Is this possible to change a specific text box on a form to a combo box?

Thanks,
 
On my form, I have a field that is a text box data type. I want to change it to a lookup field. Is this possible to change a specific text box on a form to a combo box?

Actually you have a Control on your form that is a TextBox ControlType.

Right click on it and select Change To ... ComboBox.

You need to set the properties to make it work.
RowSource, RowSourceType, BoundColumn, ColumnCount, ColumnWidths
 
So in messing around with this, I've noticed that I can't make this change in 'layout view' but I can make the change in design view by right clicking on the text box and selecting Change To.

Why is this?

Btw...what do you mean by I have a Control on my form that is a textbox ControlType. Could you further explain what those two things are and where I can find them.

Thanks,
Brady
 
So in messing around with this, I've noticed that I can't make this change in 'layout view' but I can make the change in design view by right clicking on the text box and selecting Change To.

Why is this?
Layout view allows changes to an object's updateable properties but not changing it to to a different object. A combo is a different type of object.


Btw...what do you mean by I have a Control on my form that is a textbox ControlType. Could you further explain what those two things are and where I can find them.

Just a matter of terminology. The boxes on Access forms are called Controls rather than fields. ControlType is a property of a control.

Fields are in tables and queries where they are too frequently referred to as "columns". In turn Columns are not really in tables but actually in list boxes and combo boxes.

Unfortunately Microsoft uses the wrong terms in several places such as adding a "column" to a table and referring to fields in ConditionalFormatting.

Much of the confusion comes from the terminology difference between Access and other technologies. Boxes on forms are called Fields in html. Column is used in design of MS SQL.

However it is best to use the correct terminology for Access because these are the terms understood by VBA. If you refer Fields in an Access form you will get a field in the recordset not a textbox on the form. (I won't go into the exact syntax here as that is quite involved.)
 

Users who are viewing this thread

Back
Top Bottom