Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2022
    Posts
    17

    Access VBA questions!

    Good morning and thanks for any suggestions!
    Using VBA: How to use the control AUTO POLICIES.EFFECTIVE DATE to set 6 months ahead in
    the control EXPIRATION DATE. Both use Short Date as the format type.

    In the EXPIRATION DATE field I tried =[EFFECTIVE DATE]+182 but in some instances it jumps a day ahead or behind.
    For example, if I input 01/25/2022 the result is 07/26/2023 instead of 07-25-2022
    Using a command button to enter in date is my preferred end result. That way I’ll have a button for a


    6-month policy and a 12-month policy


  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    investigate the dateadd function e.g.

    =dateadd("m",6,[EFFECTIVE DATE])

    should be no need to store the value in a table, just calculate as required

    https://learn.microsoft.com/en-us/office/vba/Language/Reference/User-Interface-Help/dateadd-function

  3. #3
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    229

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    fcunnjinghamjr - you might want to read this lest you quickly lose audience members.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Access VBA questions!
    By fjcunninghamjr in forum Access
    Replies: 5
    Last Post: 11-13-2022, 07:12 PM
  2. Two MS Access questions
    By amir_9 in forum Access
    Replies: 4
    Last Post: 03-08-2012, 06:38 PM
  3. New to Access Questions
    By mneko in forum Access
    Replies: 2
    Last Post: 03-25-2011, 11:16 AM
  4. Some Access Questions
    By amegahed3 in forum Access
    Replies: 1
    Last Post: 04-11-2010, 12:24 AM
  5. New to Access and have questions
    By MichelleFinn in forum Access
    Replies: 1
    Last Post: 04-04-2008, 06:30 PM

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