List box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using access 2003
I am creating a db in which I want one field to list 3 company names (drop
down list). I think I have done something wrong but I am not sure what. In
the Db Table for the [company] field I went to the lookup tab, List box,
Value List, and in the next line listed all of the Company names seperated by
a ";" Ex: company a;company b;company c.
When I checked the db in the datasheet view everything looks good, but on my
form the field is black with white lettering for the first Company Name. If
I scroll down to the 2nd or 3rd name - they are OK - black letters on white.
Does anyone know what I did wrong?

aurora
 
Hi Aurora,

since you are using 2 columns, did you set ColumnCount to 2?

You will also need to set the ColumnWidths to, for instance --> 0;2

and the ListWidth to the sum of the columnwidths --> 2

From your description, it appears that the first row is selected... do
you have a DefaultValue set for this control?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Crystal:
Thank you for replying. I think I am not doing something right on the form
itself. I want a drop down list from the [Company] field. When I view the
table it looks right. I click on the down arrow of the [Company] field
(which at this time looks empty) and the list of the 3 companies comes up
(black lettering on white space) and I can choose which Company I want. But
on the form, it comes up with the first company listed (white lettering on
black space) and no matter which Company I choose, it continues to stay with
white lettering on black space. One other thing I noticed is that on the
form the [Company] field does not have the one arrow like it does on the
table - instead it has 2 little arrows like the scroll bar. That should not
be. Can you help me?

Aurora

strive4peace said:
Hi Aurora,

since you are using 2 columns, did you set ColumnCount to 2?

You will also need to set the ColumnWidths to, for instance --> 0;2

and the ListWidth to the sum of the columnwidths --> 2

From your description, it appears that the first row is selected... do
you have a DefaultValue set for this control?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I am using access 2003
I am creating a db in which I want one field to list 3 company names (drop
down list). I think I have done something wrong but I am not sure what. In
the Db Table for the [company] field I went to the lookup tab, List box,
Value List, and in the next line listed all of the Company names seperated by
a ";" Ex: company a;company b;company c.
When I checked the db in the datasheet view everything looks good, but on my
form the field is black with white lettering for the first Company Name. If
I scroll down to the 2nd or 3rd name - they are OK - black letters on white.
Does anyone know what I did wrong?

aurora
 
A list box is not the same as a drop down box. It sounds like in the table
you used a combo box but in the form you used a list box. That is fine
except that you need to be aware the function differently. It sounds like
the list box on your form is very short so that you can only see one line.
Either expand its height or delete the control and add a combo box instead.

Also can you edit other controls on the form? If not then check both of the
following.
Is the form control source a query that does not allow updates. Certain
types of joins in queries will make the data non-updateable.
In the form properties make sure you don't have Allow Edits - false

BTW the black background with white text simply means that the row in the
list box is selected.

Tony



Aurora said:
Crystal:
Thank you for replying. I think I am not doing something right on the
form
itself. I want a drop down list from the [Company] field. When I view
the
table it looks right. I click on the down arrow of the [Company] field
(which at this time looks empty) and the list of the 3 companies comes up
(black lettering on white space) and I can choose which Company I want.
But
on the form, it comes up with the first company listed (white lettering on
black space) and no matter which Company I choose, it continues to stay
with
white lettering on black space. One other thing I noticed is that on the
form the [Company] field does not have the one arrow like it does on the
table - instead it has 2 little arrows like the scroll bar. That should
not
be. Can you help me?

Aurora

strive4peace said:
Hi Aurora,

since you are using 2 columns, did you set ColumnCount to 2?

You will also need to set the ColumnWidths to, for instance --> 0;2

and the ListWidth to the sum of the columnwidths --> 2

From your description, it appears that the first row is selected... do
you have a DefaultValue set for this control?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I am using access 2003
I am creating a db in which I want one field to list 3 company names
(drop
down list). I think I have done something wrong but I am not sure
what. In
the Db Table for the [company] field I went to the lookup tab, List
box,
Value List, and in the next line listed all of the Company names
seperated by
a ";" Ex: company a;company b;company c.
When I checked the db in the datasheet view everything looks good, but
on my
form the field is black with white lettering for the first Company
Name. If
I scroll down to the 2nd or 3rd name - they are OK - black letters on
white.
Does anyone know what I did wrong?

aurora
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top