Results 1 to 3 of 3
  1. #1
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249

    Calculating a time based on a text feild controlled by a combo box?

    I have a form that contains a set of combo boxes that allows the user to select an Event (ICREventCombo) and then a set of senarios (ICRScenarioCombo) from that event. ICRScenarioCombo has the following Row Source:



    Code:
    SELECT Scenarios_tlb.Test_Case_Number, Scenarios_tlb.Event_Name, Scenarios_tlb.Sim_Time_Data, Scenarios_tlb.Sim_Time FROM Scenarios_tlb WHERE (((Scenarios_tlb.Event_Name)=[Forms]![BOA ICR Times]![ICREventCombo])) ORDER BY Scenarios_tlb.Test_Case_Number; 
    It is formated as a General Date.

    I also have a text box (Sim_Time_Data) with the following Control Source:

    Code:
    =[ICRScenarioCombo].[column](2)

    I would like to create a second text box that subtracts 3 minutes from the
    Sim_Time_Data text box. How can I do that?


  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    =dateadd("n",-3,Sim_Time_Data)

  3. #3
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by ranman256 View Post
    =dateadd("n",-3,Sim_Time_Data)
    I just got back from vacation to see your reply and it worked perfectly. Thank you.

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

Similar Threads

  1. Replies: 2
    Last Post: 08-03-2017, 04:58 AM
  2. Replies: 1
    Last Post: 04-01-2015, 01:29 AM
  3. Replies: 30
    Last Post: 07-21-2014, 02:46 PM
  4. Replies: 3
    Last Post: 03-15-2012, 02:27 PM
  5. Replies: 3
    Last Post: 12-09-2011, 11:55 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