LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Populate ComboBox list with Access data

Here's my scenario:

Userform1 Contains two (2) Labels (Label1 and Label2) and three (3)
ComboBoxes (ComboBox1, ComboBox2 and ComboBox3):

(System Type) Label1.Caption = Asphalt
(Vendor) Label2.Caption = JonCo
(Base Layer) ComboBox1
(Mid Layer) ComboBox2
(Top Layer) ComboBox 3

When the Userform_Initialize() routine runs, I would like it to check the
Caption of Label2 for the vendor name (in this case JonCo) and then populate
the list of ComboBox1, ComboBox2 and ComboBox3 with the correct items from
the database; in this case jonco.mdb. IE: if Label2.Caption = AllanCo then
myDb = OpenDatabase("allanco.mdb")

jonco.mdb info:
Only three (3) columns: prType, prUse and prName

I don't know how to write the sql query string, but I've seen enough info
by searching I can establish the database and the connection. I just need to
load the data now... so here's what I need from the database:

If the prType = hot and prUse = base then I need ComboBox1 to be populated
with all matching entries from the prName column. If prType = hot and prUse =
mid then populate the list of ComboBox2 and same thing for ComboBox3: if
prType = hot and prUse = top then fill in ComboBox3 with all matching
entries... It sounds easy to me, but I lack the Access experience to
correctly construct the query string.

Thanks in advance!!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get Excel 07 combobox to populate from MS Access table? xz Excel Discussion (Misc queries) 0 November 20th 07 05:45 PM
Populate Combobox with Pivot Table Data [email protected] Excel Programming 0 July 5th 06 05:02 PM
how to populate a combobox with a list of unique values? RIOSGER Excel Programming 2 August 9th 05 04:16 AM
Populate unique list in combobox Mark Excel Programming 3 July 26th 05 09:27 AM
Having data populate text boxes based on Combobox Value Todd Huttenstine[_2_] Excel Programming 1 November 10th 03 01:35 AM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"