Results 1 to 3 of 3

Thread: Requery Problem

  1. #1
    Join Date
    Oct 2006

    Unanswered: Requery Problem

    I am making a take away database, so when different quantities, or products are chosen it will affect the total price.

    The total price is a query with the function SumOf. However, when updating the form i must go to the next record and then back again, or exit the form and re - opening before seeing the update. I am told that a Requery function will be able to solve this problem and update it.

    But after playing around with the function i cannot get it to work?

    any advice?

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Depending on how your forms work/how you change the quantities/products...

    take a look at running a .Requery function in events such as AfterUpdate of a control or OnChange etc etc.

    Find out exactly when you want the data to be requeried and then run the neccessary code.

    One idea I use is to put messageboxes behind events so I can diagnose where I want my event.

    How's that?
    Home | Blog

  3. #3
    Join Date
    Feb 2004
    Chicago, IL
    Also, keep in mind that just because the data is changed on the form, the data not be committed to the table the query is looking at. In order to update as soon as the user makes a change to the record you will need to save the record. You can use:

    DoCmd.RunCommand acCmdSaveRecord

Posting Permissions

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