Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    Belfast, Ireland
    Posts
    339
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Refresh ALL (Access 2007)

    I've searched the Forums for 'Refresh All' and can't find any posts, so I'm assuming no-one else has posted a message regarding this (although I would've thought it was a common question).

    I've got a Form that includes 3 Fields: Agreed Price, VAT, and a "Total" textbox (no underlying field). I've written some code that says if VAT = True, then txtVtotal = Agreed Price + 17.5%, etc. When someone checks the VAT checkbox, I'd like txtVtotal to update automatically.

    I have added every conceivable Refresh, Requery, etc to the LostFocus, GotFocus, AfterUpdate, Click, BeforeUpdate, etc, on the Form, VAT Checkbox, and txtVtotal textbox with no results. None of them forces the Entire Form to Refresh (equivalent of RefreshALL/F5). Can someone tell me what I'm doing wrong? I've spent an hour looking through all the Access/VBA Help pages and even Microsoft's website (+ Google Searches).

    I'm sure this is easy and I've just added the wrong code to the wrong control, but however I get txtVtotal to update as soon as someone checks the VAT checkbox eludes me.

    Any help is appreciated, as usual!

    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Refresh ALL (Access 2007)

    The After Update event of the VAT check box should do the trick.
    But why don't you place a formula in the txtVtotal text box?

    =[Agreed Price]*(1+IIf([VAT],0.175,0))

    You wouldn't need code at all.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    Belfast, Ireland
    Posts
    339
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Refresh ALL (Access 2007)

    Thanks Hans.

    I always feel so dumb.

    Your Code in the Text Box works perfectly. Wish I had remembered to do that. <img src=/S/doh.gif border=0 alt=doh width=15 height=15>
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> As always.

Posting Permissions

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