creating a combo list

  • Thread starter Thread starter Christopher Glaeser
  • Start date Start date
C

Christopher Glaeser

When creating a form from a table using the Wizard, it appears that all
fields are text boxes. Is it possible (and advisable) to convert a text box
into a combo list using the Properties dialog? Or, is this best done in the
design view by deleting the text box and then using the tool box to insert a
combo box?

Best,
Christopher
 
Hi Christopher

no problems either way (that i'm aware of) but as the text box is already
there i would change it to a combo box
right mouse click on it
choose Change To - Combo Box
right mouse click again
choose Properties
go to Row source
click on the ...
add the table that you want as your source for the combo box
add the field(s) - make sure the primary key field is the first field you
select
close the query window
say "Yes" to updating the SQL
modify the following properties as required:
column count
column widths (if you don't want to see the primary key field, change
the width to 0cm - or whatever)
close the property box
view form in form view
test out combo box.

hope this helps

Cheers
JulieD
 
I'm getting close, but my combo box does not work correctly after the
conversion. The properties and SQL look identical to the combo box I
created with the wizard, but my converted combo box lists the index instead
of the data (i.e. converted box is 1, 2, 3 and it should be red, blue
greeen). Any ideas on what I'm missing?

Best,
Christopher
 
I'm getting close, but my combo box does not work correctly after the
conversion. The properties and SQL look identical to the combo box I
created with the wizard, but my converted combo box lists the index instead
of the data (i.e. converted box is 1, 2, 3 and it should be red, blue
greeen). Any ideas on what I'm missing?

Check the ColumnWidths property. Columns that you want to conceal (the
ID in this case) should have zero width; what you'll see in the combo
when it's not dropped down is the first nonzero width field.

If the RowSource of the combo is something like

SELECT ColorID, ColorName FROM Colors ORDER BY ColorName;

then you'll want the ColumnWidths property to be something like

0;.5
 
Check the ColumnWidths property.

Thanks, that got it! The Column Count and Width were wrong.

Best,
Christopher
 
Back
Top