Newbie: Drop-down list question 
Author Message
 Newbie: Drop-down list question

I have a VB app that uses an Access database.  I have a combobox (type
drop-down list) that I want to use to view each Name in the table.

cboName.text = rs.fields("Name")

Everytime the user moves to another record, the text property of the
combobox is updated with the new value.  This is during viewing of records.
The combo is disabled so the drop-down list is not accessable.

During add and edit, the combo is enabled and a list of all the names is
loaded into the drop-down.  The user can pick and when save is  pressed the
field is updated or added with the value of cboName.Text.

This works fine with just one combobox, but when I put two on a form, Lets
say cboState, I get the error Text property is read-only.  What I don't
understand is why can I do it with one combobox on the form, but when two
are added (with different names) it gives me this error.

What I'm trying to accomplish is to only use a drop-down list for viewing,
adding, and editing records.  This way I don't have to view part of the
record like Name in a textbox, and then when I want to add a record have to
change Txt.visible to false and cbo.visible to true.   This method will only
be used on ClientName, and BuyerName (both combos get list value from table
where names are saved.)

Any ideas as to how to use a drop-down to do this, or any ideas why it will
only work with one combo and not more than one.  I might need to mention
that the program was written to use textboxes to enter the date, but it
seems useless to type in information when I drop-down can give the user all
available options.  I deleted the textboxes and added drop-down lists.

Thanks,

James



Tue, 31 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Drop Down List Box - Drop Down portion does not always disappear after Click event

2. Drop Down List Question (And Tray Question)

3. Drop Down List Question (And Tray Question)

4. Drop Down List Question (And Tray Question)

5. Drop Down List Question (And Tray Question)

6. Drop Down List Question (And Tray Question)

7. how to drop down a combo box list (newbie)

8. Drop-Down List (ComboBox) and Text Box questions

9. stupid drop-down list question.....

10. Drop-down list box Question?

11. Drac's questions on drop down lists in combo boxes

12. Question on a drop down (List) box

 

 
Powered by phpBB® Forum Software