1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

refreshing feilds

Discussion in 'Business Applications' started by nomad, Oct 16, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. nomad

    nomad Thread Starter

    Joined:
    Sep 30, 1999
    Messages:
    386
    I am building a database with ms access and I have win 2000. I have built a form and one of the fields is a calculation, but I have to shut down the form and re-open it before it makes the caluculation. Can someone tell me how to update that feild without shutting down the form.

    thanx
     
  2. Erm

    Erm

    Joined:
    Jul 30, 2003
    Messages:
    298
    I believe you can either go to the Records menu at the top and click on Refresh...or if you want to keep it form based you could create a button that when you click it, the page will refresh. You can do this using the wizard, create a button with the wizard button depressed on the toolbox, then select form operations under the category's list and Refresh Form Data under the actions list, then follow the instructions. Hope this makes sense, if you need clarification please ask!

    Good luck!
     
  3. nomad

    nomad Thread Starter

    Joined:
    Sep 30, 1999
    Messages:
    386
    I thought maybe I could do somethng so it is automatic
     
  4. XL Guru

    XL Guru

    Joined:
    Aug 30, 2003
    Messages:
    2,702
    >> one of the fields is a calculation

    How did you do this? Access Help says the easiest way is -

    Plonk a text box (from Control ToolBox) on the form.

    Type the expression straight into the box, eg:

    =[Sales*.2]

    , where Sales is a field name.

    HTH,
    Andy
     
  5. Erm

    Erm

    Joined:
    Jul 30, 2003
    Messages:
    298
    I've not looked into this, but it should be possible. Make a macro that refreshes/build an event that refreshes and put this in the lost focus property of the calculated field. You may have to put it in a different property, perhaps before update?...You get into the properties of a text box/combo box etc, by right clicking on it in design view of the form and selecting properties.
     
  6. downwitchyobadself

    downwitchyobadself

    Joined:
    Oct 13, 2000
    Messages:
    941
    First, just to clear up a little terminology: a field is in a table; it is a type of data. A control is what is found on a form, and may or may not be related to a field, or, in your case, a series of fields.

    It should be as simple as writing a little macro using the Requery action and the control in question, in the syntax Forms!MyFrmName!MyCalcCtlName , and then setting the AfterUpdate event of the control(s) affecting the calculation to that macro's name. Otherwise, in order to answer your question, please tell us (1) what the control source of the calculated control is, and (2) when you want it updated, i.e. how you're using your form.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/172279

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice