Results 1 to 4 of 4

Thread: Please Help! CboBox/DB Access Please,Please!!

  1. #1

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    I assume that if the DB was in Form A that you'd know how to fill the cboBox, but if not then post a reply and I'll tell you how to do that.

    Otherwise, to access the same database from more than one form, you need to define the database so that it has global scope. To do that, create a code module if you don't have one, and add a line like

    Public MyDB as DataBase

    ------------------
    Marty
    What did the fish say when it hit the concrete wall?
    > > > > > "Dam!"

  2. #2
    Lively Member
    Join Date
    Feb 2000
    Posts
    67

    Post

    First, Thanks for your help! Basically, I can get the cbo box to display the name field from my DB on it's initial line. But I want to be able to use a drop down, displaying all the 'Names' on the DB. So the user can choose and access an account by selecting the name off the list. Thanks again!

  3. #3

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Code:
        Do Until MyRecordSet.EOF
            frmMain.Combo1.AddItem MyRecordSet!MyField
            MyRecordSet.MoveNext
        Loop
    ------------------
    Marty
    What did the fish say when it hit the concrete wall?
    > > > > > "Dam!"

  4. #4
    Lively Member
    Join Date
    Feb 2000
    Posts
    67

    Post

    How can I get a cboBox on form "a" to list the 'Name' Field from a DB on Form B? I'm killin myself trying to figure this out, please help. Thanks in advance!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width