Results 1 to 4 of 4
  1. #1
    thegrimmerdiscovery is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    30

    One field dependent on another

    Earthlings, imagine this, if you will:



    In field one : a start date and time
    In field two : end date and time
    In field three : A calculated field to express the duration between fields one and two in hh:mm.

    All good to this point.

    However, in field four I want to allow text inputting if field three reports a total that is equal to or greater than 24 hours. But if it's smaller than 24 hours either inputting should not be allowed or the field should automatically populate with: 'Not required'.

    I'm guessing this can be done in Access but no amount reading around this morning has shown me how. And to be honest, it's sapping my morale.
    Guidance on how to achieve this, preferably described in terms that a relative imbecile cand make sense of, would be deeply appreciated.

  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Assuming this is on a continuous form, You would do this with either conditional formatting to enable or disable the control or use the oncurrent event to enable or disable the controls input.

    The display of "Not Required" and the ability to enable text entry is slightly more interesting.
    If you were to calculate this it wouldn't editable, so some other method is required.
    In fact possibly due to a lack of coffee this morning, I'm struggling to think of an elegant way of doing this short of hiding a text box or similar over the top of the control.

    Think I'm having a stupid moment...
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    thegrimmerdiscovery is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    30
    Minty - I'll have a look at the options you've described as viable. It's good to know that it can be done and I'm not hopelessly flailing about for the impossible.
    All the best.

  4. #4
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    Minty is definitely off his game this AM. Get him some coffee or something.

    If I am understanding the OP need correctly, should this be very doable with an IIF statement in the text box? Maybe I am not stating clearly what I am thinking but it should be able to be done.

    Can you zip up and post the database so we can get a look at it and further assist.

    Thanks

    Dave

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-13-2017, 12:29 PM
  2. Replies: 1
    Last Post: 09-25-2015, 09:05 AM
  3. Replies: 18
    Last Post: 10-25-2012, 10:57 PM
  4. Replies: 4
    Last Post: 02-08-2011, 08:43 AM
  5. Setting a field to be dependent on another
    By CushingMT in forum Forms
    Replies: 0
    Last Post: 11-19-2008, 11:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums