Access 2.0/VB3.0 Combo box 
Author Message
 Access 2.0/VB3.0 Combo box

I'm new to both Access and VB.  Currently I'm playing around with VB3.0 Pro
and an Access database.  What I want to know is is there any way to use an
Access field as a data source for a default-style combo box??

I apologise if this is a FAQ,  please point me in the appropriate direction
if so.

TIA

Regards,

Philip Pursglove
Business Information Systems
De Montfort University,  Leicester,  UK

        "We grew a female because it'd be more docile and controllable"
        "You guys don't get out much,  do you"
                                B Kingsley & M Madsen,  Species



Fri, 31 Jul 1998 03:00:00 GMT  
 Access 2.0/VB3.0 Combo box

Quote:

> I'm new to both Access and VB.  Currently I'm playing around with VB3.0 Pro
> and an Access database.  What I want to know is is there any way to use an
> Access field as a data source for a default-style combo box??

> I apologise if this is a FAQ,  please point me in the appropriate direction
> if so.

> TIA

> Regards,

> Philip Pursglove
> Business Information Systems
> De Montfort University,  Leicester,  UK

>    "We grew a female because it'd be more docile and controllable"
>    "You guys don't get out much,  do you"
>                            B Kingsley & M Madsen,  Species

I think that you are asking how to bound access datafield to a
combo box in Visual Basic?

1. Select a field in the access database to bound with combo box.

2. In Form Load event, load the database and select the database
field which you will be bounding

eg: Data1.DatabaseName = "MYDB.MDB" (MYDB dtabase in VB directory)
    Data1.RecordSource = "Select FirstName From Customer" (FirstName = database Field, Customer = Table name)
    Data1.Refresh

    Do While Data1.Recordset.EOF = False
        Combo1.AddItem Data1.Recordset("FirstName")
        Data1.Recordset.MoveNext
    Loop

Hope it will help (if I understand your question).

Vikhe.S



Sun, 02 Aug 1998 03:00:00 GMT  
 Access 2.0/VB3.0 Combo box

Quote:

>I'm new to both Access and VB.  Currently I'm playing around with VB3.0 Pro
>and an Access database.  What I want to know is is there any way to use an
>Access field as a data source for a default-style combo box??

Hi this is exactly what I needed to do. I found an aftermarket
combo box (what I believe is called a Custom Control) called CSCombo
(.VBX). I can't recall exactly where I came across it but it is from
Crescent (Systems ?) and can be 'bound' to a data control just like
a text box.

The really neat thing is that you can also bind the list of choices
to *another* data control, so that you can have a reference table
in the data base which provides the Users with the valid entries.

I'm still sorting out some finer points of its use (like, if you re-
load the reference table and Refresh the Combo box, the current
choice disappears and if you're not carefull that record gets a
blank when they update) but I'm sure it saves it great deal of
code.

----------------------------------------------------------------------
Stephen Meredith            (A Canadian refugee from the snow and ice)

Computer Centre          /      \  Telephone : +61 77 815913
James Cook University    \_.--._/         Fax: +61 77 815230
Townsville                     v
Queensland 4811  AUSTRALIA
----------------------------------------------------------------------
  Ride: BMW R65        Drive: BMW 525      Fly: Cessna 152/172/182
----------------------------------------------------------------------



Mon, 03 Aug 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Accessing Access 2.0 database with VB3, ODBC 2.0 and Microsotf Jet Engine Compatibility Layer

2. Linking Combo Boxes to Access 2.0

3. Want Access combo box to filter rowsource of another combo box

4. Help: Problem reading Access 2.0 mdb from VB3 under Win95/Access 7.0

5. Problems accessing Access 2.0 via ODBC 2.x from VB3.0

6. Limiting Access to Text Boxes, List Boxes and Combo Boxes

7. how add columns to a combo box in vb like access combos

8. MS Forms 2.0 Combo Box Question

9. MS Forms 2.0 Combo box Drop Down

10. forms 2.0 combo box column heads

11. MS Forms 2.0 Combo Box Problem

12. Dbgrid & Forms 2.0 Combo Box

 

 
Powered by phpBB® Forum Software