Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Posts
    18

    Unanswered: Update field when certain criteria reached.

    This may sound really stupid but please bear with me.

    I have a form with a combobox on it. What i want is when a user chooses from the list another field will update with the days stae + 5.

    I can then conditional format on the date field which will flag up when the 5 days have elapsed.

    Any ideas?

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Unhappy stae + 5.

    Please explain
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Sep 2003
    Posts
    18
    Ok.

    I have a combo box called [status] and a date field called [response_date].

    What I want to happen on the form is when a user picks a certain subject from the combo box eg 'at screening panel' the date field becomes populated with the date five days on.
    This will enable me to chase up any records which have had no updates within the required five days.

    Is that the sort of info you meant?

    Cheers

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Date Help

    Hi Mark, Bear in mind I am no expert but created a workaround to your situation. I have it below and tweak as you please or ignore. I have a ReceivedDate field in my table for when stuff comes in. I have a DueDate field that is 3 days past the date received. You can have a date field that automatically inputs the current date: Date() and just hide it. Then use this field DueDate to do the trick. The function is:
    DueDateateAdd("d",3,[ReceivedDate]
    Try it if you like, or ignore it. I am certain there is a better way to do it but is all that I know so far.
    take care,
    Bud
    Attached Thumbnails Attached Thumbnails datehelp.bmp  

  5. #5
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb DateAdd

    Put this code in the AfterUpdate event of the combo box

    me.nameofyourdatefield = dateadd("D",5,date())

    This will insert THECURRENTDATE + 5 "D" (days) when the user changes the combo box
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  6. #6
    Join Date
    Sep 2003
    Posts
    18
    Thanks for your help.

    What I need though is a different set of rules for each option in the combo box.

    eg. option 1 may add 5 days, option two may add 1 days etc....

    Thanks in advance.

  7. #7
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Case statement

    Put this code in the AfterUpdate event of the combo box

    Select case me.nameofyourcombobox

    case 1 '(Where 1 is the value stored for the first option
    me.nameofyourdatefield = dateadd("D",5,date())'Or whatever

    case 2' (Where 2 is the value stored for the second option
    me.nameofyourdatefield = dateadd("D",5,date())

    case 3' etc....

    end select
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

Posting Permissions

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