Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Location
    Oxford, England
    Posts
    38

    Unanswered: Refreshing combo box - not behaving

    Can anyone help?

    I have a simple combo box in a subform that looks up values from one table and stores them in another. My problem is that when i select a new record in the main form, although the subform changes accordingly, the combo box list the previous record. I have to go Records, refresh to update it. What's peculiar is that if i go into the properties of the combo box and run the combo's query in the query builder it works fine!

    Ive been through all the threads i can find on the subject and tried requerys and repaint and the like but none of works.

    Any ideas??

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    If you want send a Sample base in Access 97 and i see what is the problem.
    But if the problem is like you say, with a requery of the comb box control
    when the subform is activate must work fine.
    Saludos
    Norberto

  3. #3
    Join Date
    Dec 2003
    Location
    Oxford, England
    Posts
    38
    I would, but i'm at work and i cant downlaod any Zip software to send the sample base. But thanks anyway.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Did you use the Requery methoud of the ComboBox

  5. #5
    Join Date
    Dec 2003
    Location
    Oxford, England
    Posts
    38
    Yeah, i tried that. Like i say the query works fine, it just seems to be what the combo box displays in form view. I've even put the query (that runs the combo) in the subform to watch how it behaves - and it calls up the correct data! But the combo still lists the previous records!

  6. #6
    Join Date
    Dec 2003
    Location
    Oxford, England
    Posts
    38
    Ah!

    Ive solved it! I had to put mycomboname.requery in the VB of the combo in the On Got Focus event.

    Sorted! Thanks.

Posting Permissions

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