Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Nanded, India

    Unanswered: Instead of 00.00 AM I need to change date at 09.30 PM


    My client says they want new date in the invoice once it is 9.30 PM into the system of thier clinic.

    I know if it is 00.00 AM the system date will change but how to change the system date once the current time reaches 9.31 PM.

    The field name in the invoice is InvDate which is in the header form called "F_InvHead" automatically receiving system date once the add button clicked to add new invoice.

    Any idea?
    With kind regards,

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    Hi Ashfaque,

    dim DDate as date
    DDate = format(me!InvDate ,"h:nn AM/PM") '(where me!InvDate is the field on the current form)
    if DDate > #9:30 PM# then.....

    (or If DDate >= #9:31 PM# then....)

    Notes: I usually find it works best storing the field's time portion into a date variable first and then apply your formula against that variable.
    Last edited by pkstormy; 04-19-09 at 10:33.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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