Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refresh (Office XP)

    I am having a problem with refreshing form data. In my data entry screen I select a company name from a combo box that pulls the company name from via a query from another table. The data entry screen records new sales details relating to the customer selected from the combo box. If I have a need to add a new customer I (using a command button) open another form and add the new customers details. I then close this form which returns me to my original data entry form. I then click a "refresh" command button which updates the list in the combo box.

    What I would like to do is have this list updated automatically once I close the "add a new customer" form and return to the "update customer sales" form. I have attempted to copy the code from the refresh command button and add it to the close form command button on the "add a new customer" form. This works really well, but only the first time I do it i.e if I add a second new customer the list in the combo box will not update. It will however, update immediately if I click the refresh command button.

    I would appreciate any help on this.

    Thanks...Peter

  2. #2
    Star Lounger
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Refresh (Office XP)

    Thanks - I will give that a go.

    Regards...Peter

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Refresh (Office XP)

    <P ID="edit" class=small>(Edited by patt on 11-Jan-03 08:32. Changed the word dialog to modal)</P>You have to do a ReQuery of the combobox after you return from the "add a new customer" form.
    So the requery could go directly after your code that opens the "add a new customer" form, as long as the "add a new customer" form is a modal (not dialog) type form.
    HTH
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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