Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating list box in form (2000)

    I am new at access
    I would like to edit a table by opening a form and selecting a record from a field
    The other fields on the form should be updated after my selection from the specific record
    Please help

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating list box in form (2000)

    There

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Creating list box in form (2000)

    In addition to Rupert's suggestion, this thread might give you the basic information you're looking for.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating list box in form (2000)

    I'm still stuck.

    I've tried the following code but nothing happens:

    Private Sub cbo_acc_sup_no_AfterUpdate()

    Me.RecordsetClone.findfirst "acc_sup_no = " & cbo_acc_sup_no & "'"
    Me.Bookmark = Me.RecordsetClone.Bookmark

    END SUB

    It seems like it doesn't pick up the value selected so the find doesn't execute.
    If I select the value in cbo then it doesn't update the acc_sup_no and all the other fields on the form
    Thanks for the referance to the "web"book. I will learn a lot there.

    thanks for the help so far

  5. #5
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating list box in form (2000)

    Here is a small sample database.
    I can't seem to get it to work.
    If I select cbo_alfa it should populate the form

    Thanks

    Mario
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Creating list box in form (2000)

    You've got two problems.

    1) You renamed the combobox but left the code in the event procedure for the old name. Renaming a control doesn't do anything to the code--you have to do that yourself.

    2) In your sample, the value in the combobox is a number, but you're wrapping it in delimiters, which causes a type mismatch. Try this instead:

    Private Sub cbo_alfa_AfterUpdate()
    Me.RecordsetClone.findfirst "alfa = " & cbo_alfa
    Me.Bookmark = Me.RecordsetClone.Bookmark
    End Sub
    Charlotte

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating list box in form (2000)

    Right, well the first thing is when I tried to add another combo box to your sample data base I got an error message

  8. #8
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating list box in form (2000)

    Thanks it work like a charm
    It seems like all the code was for previous versions of Access
    I'm feeling stupid not reading all the options in the combo box wizard

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating list box in form (2000)

    Well I think I owe you an apology. I should have directed you to this wizard first.

    One thing you should be aware of though is that the combo box isn

Posting Permissions

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