How to reference one field of Access DB to fill cbo 
Author Message
 How to reference one field of Access DB to fill cbo

I'm looking for a code example on how to refer to an Access database's field
in a table, to populate a combobox or textbox.

Let's say you've opened the DB, and referenced the cbo as such:

Set rst=dbs.OpenRecordSet("Names")
Set ctrl=Item.GetInspector.ModifiedFormPages("Name
List").Controls("cbofname")

From the "Names" table, how do I extract the values of the , say "FirstName"
fields, and post them in the combobox "cbofname"?

I see the generic examples for pulling arrays from rows, but if I only want
ONE SPECIFIC field from the table, that's what I'm looking for.

Any help is appreciated..

HM



Tue, 03 Aug 2004 01:21:58 GMT  
 How to reference one field of Access DB to fill cbo
How about

Do Until rst.EOF
    ctrl.AddItem rst!FirstName
    rst.MoveNext
Loop


| I'm looking for a code example on how to refer to an Access database's
field
| in a table, to populate a combobox or textbox.
|
| Let's say you've opened the DB, and referenced the cbo as such:
|
| Set rst=dbs.OpenRecordSet("Names")
| Set ctrl=Item.GetInspector.ModifiedFormPages("Name
| List").Controls("cbofname")
|
| From the "Names" table, how do I extract the values of the , say
"FirstName"
| fields, and post them in the combobox "cbofname"?
|
| I see the generic examples for pulling arrays from rows, but if I only
want
| ONE SPECIFIC field from the table, that's what I'm looking for.
|
| Any help is appreciated..
|
| HM
|
|



Tue, 03 Aug 2004 01:35:45 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using one fill-in field as a bookmark reference for rest of document

2. Fill field in one table from field in another table

3. accessing records in one secure DB from another secure DB - programatically

4. Exporting Tables From One Access DB to a New One

5. Copy Access/Oracle table from one DB to another DB.

6. export data from one access db to same db on another machine using vb6

7. Adding Field to Access db - need to make indexed property of field No Duplicates

8. Filling a List Box with an Access DB?

9. I want to fill a ComboBox with tables from an Access DB

10. Button for filling a fill-In field ? (Newbie)

11. Button for filling a fill-In field ? (Newbie)

12. Button for filling a fill In field ? (Newbie)

 

 
Powered by phpBB® Forum Software