Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002
    Posts
    157

    Unanswered: How can I get a Combo box to reflect the changes made to a table?

    I have two forms called:
    - [ClientDetailsFormNEW]
    - [aPrimaryPresentingIssueTypeF]

    On the [ClientDetailsFormNEW] form I have a combo box called PPI with the following row source:
    SELECT PrimaryPresentingIssue.PPI FROM PrimaryPresentingIssue ORDER BY PrimaryPresentingIssue.PPI;
    And a button (called [PPIBTN]) which opens the [aPrimaryPresentingIssueTypeF] form.

    The [aPrimaryPresentingIssueTypeF] form is used to add/edit/delete details on the PrimaryPresentingIssue Table.

    The idea is that when the user opens the [ClientDetailsFormNEW] form and clicks on the PPI combo box, if they notice that they need to add a new record, they can simply click on the [PPIBTN] button (which opens the [aPrimaryPresentingIssueTypeF] form), add the new record, close the form and then click back onto the PPI combo box to see the updated listing.

    My problem is that when I click on the PPI combo box (after adding a new record using the [aPrimaryPresentingIssueTypeF] form ) the PPI combo box is not reflecting the changes made.

    How can I make the PPI combo box reflect the changes made?

    Thanks heaps in advance for any help provided.

    Karen Day

  2. #2
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    Karen--

    You need to call the requery method of the combobox. You'll probably need to call it from the PPIBTN button after all the other code as ran. Something like PPI.Requery - or whatever you named the PPI combobox.

    C

  3. #3
    Join Date
    May 2010
    Posts
    601
    Anohter optionm it s use teh On Close event of the [aPrimaryPresentingIssueTypeF] form to requerhy the combo box.

    something like:

    Code:
    forms!ClientDetailsFormNEW.cboPPI.Requery
    Where cboPPI is the name of the combo box.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  4. #4
    Join Date
    May 2002
    Posts
    157
    Thanks to you both for the reply.
    How easy life must be when you know what you are doing!!!!!!!

    I ended up using the following option which works perfectly.
    forms!ClientDetailsFormNEW.cboPPI.Requery

    Keep up the good work guys....
    Thanks heaps.

    Karen

  5. #5
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by Karen Day View Post
    Thanks to you both for the reply.
    How easy life must be when you know what you are doing!!!!!!!

    I ended up using the following option which works perfectly.
    forms!ClientDetailsFormNEW.cboPPI.Requery

    Keep up the good work guys....
    Thanks heaps.

    Karen
    Karen,

    You're welcome.

    Glad we could assist.

    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

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