+ Reply to Thread
Results 1 to 2 of 2

How to check if field value is bigger or smaller than previous field value.

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    South Africa
    MS-Off Ver
    Access, Excel 2010
    Posts
    52

    How to check if field value is bigger or smaller than previous field value.

    Good day all

    I have a form to which I enter data like Height, Weight, Waist etc. Once a week a member is weighed and measured and that information is captured in the form. So there can be many entries for just one person. What I want to do is every time the new data is entered, for instance the weight, it must check the previous weight of that member and indicate if that member lost (Image1), gained (Image2) weight or stayed the same (Image3) by enabling one of three images. To identify a member I use a [paynumber] field. It must just use the last record for the [paynumber] field on the form. The form is called frm_ef_memberfitness. The primary key is [memberfitnessID].

    I hope this helps and makes sense.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: How to check if field value is bigger or smaller than previous field value.

    (the long way) using queries. On a form, enter the [paynumber] to get the person. Using this run these queries...

    Make Q1 that gets the TOP 1 record sorting [date] descending

    Make Q2 that gets the TOP 1 record sorting [date] descending < Max([date]) ''this gets the 2nd highest date BUT make all the fields negative.
    (select -[weight], -[height]....from table)

    Q3: You could use a UNION query of the 2,
    select * from Q1
    union
    select * from Q2

    Q4: sum Q3

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 12-09-2012, 08:37 PM
  2. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  3. Replies: 3
    Last Post: 03-03-2012, 12:16 PM
  4. formula to check bigger and smaller than
    By avengine in forum Excel General
    Replies: 1
    Last Post: 12-26-2008, 03:13 PM
  5. [SOLVED] How to find value that is bigger or smaller than 2SD?
    By learner in forum Excel General
    Replies: 8
    Last Post: 05-11-2005, 05:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1