Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Cinci, OH
    Posts
    49

    Lightbulb Unanswered: another questions

    First I want to thank everyone who helped with my last problem. I got everything to work out well.

    On the same project that I am working on I have a field, confirmation number, where myself and team tech enter a confirmation number. On enter of this field you get a input box for the confirmation number. I have the code counting to make sure the user enters 11 digits.

    From that I want to take the confirmation number, ex 12150125982 (which is 12:15) and make sure that the number is greater than 12000000000 (12 noon) and less than 12300000000 (12:30 pm). If so set ckbInWindow = true.

    I have to do a check like this for 6 different times.

    Like I said before I am new to access and learning a lot. I did a search in the forum but did not find anything that I think would work easily or that I understood completly. :-)

    Please take my thanks in advance for any input, comments, or solutions.

    Richard.

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    I didn't see your previous communications, so I apologize if what I'm saying is out of context.

    If I were you, I'd simply set a variable, say ConfTime to the digits of the system time
    Code:
    ConfTime = Format(Time(), "hhnn")
    you can then have your program prompt you for a 7-digit confirmation number, check for 7 digits, and then add the previous information
    Code:
    MyConfirmationNumber = ConfTime & MySevenDigits
    If the confirmation number needs to be numeric, change the last to
    Code:
    MyConfirmationNumber = CLng(ConfTime & MySevenDigits)
    and you won't have to worry about confirming the time each time.

    Make sure the control/variable MySevenDigits is looking for string data, or you won't be able to concatenate the numbers properly.

    Sam

    FYI The reason you format the "minutes" in the Time() function as "nn" and not "mm" is because "mm" is used for the two-digit month, not the minute. See the Format() function in the Help File for details, and make sure you read the examples.

  3. #3
    Join Date
    Aug 2004
    Location
    Cinci, OH
    Posts
    49
    Thanks everyone. I got this to work and it works great.

    This is a great forum. I will someday be a database master and be able to help others!!!

    Richard.

Posting Permissions

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