Date/time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sillyr
    New Member
    • Oct 2007
    • 37

    Date/time

    Hi -I created a form where the user enters the date and time landed. I used access 2007 to create the form, but the computer that the user has has access 2002. Date and time are separate fields. The date field is formatted with the data type Date/Time, short date and has an input mask 99/99/0000. The time field is formatted with the data type text and an input mask of 00:00;0;_. The form works correctly when I use it in access 2007, but I error messages when the user enters in data in access 2002- The value you entered isnt valid for this field. You may have entered text in a numeric field or a number that is larger than the FieldSize settings permits. I have tried to change the setting in access 2002, but keep getting the same result. Thanks for any help.
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    Are you getting errors in both fields? I don't have 2002, but what do you mean by changing the settings?

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32654

      #3
      Can I point out here that Date/Time fields don't handle both by accident. That said, you still need to get the data input.

      What you don't tell us, of course, is what data is being entered when it fails, nor the error number and message that displays.

      This information would really be helpful to give us a clue as to what may be going wrong.

      Comment

      • sillyr
        New Member
        • Oct 2007
        • 37

        #4
        By changing the settings I mean I changed the Data type: I tried number, text & Date/Time. I also changed the Format: Short Time, Short Date & General Date.

        The data that the user is entering is the date with the input mask 00/00/000
        and the time with the input mask 00:00
        date & time are entered separately into two different fields
        The error is occurring for both fields and the error message that I stated in my original post is:
        The value you entered isn't valid for this field. You may have entered text in a numeric field or a number that is larger than the FieldSize settings permits.
        Thanks Sally

        Comment

        • ChipR
          Recognized Expert Top Contributor
          • Jul 2008
          • 1289

          #5
          The message you are getting is saying that what you entered doesn't match what the field type in the table requires. Check the types on your table design as well as your form, and remove your input masks until you can enter valid data. I don't see any need for an input mask on a short date, since that is taken care of by the data type restriction.
          I recently did a text box to store a time and I used no input mask, but validation
          Len([TimeIn])=4 And <2400 And Right([TimeIn],2)<60 And <Nz([TimeOut],2400)
          That was for the TimeIn box, and for military time, of course.
          If you do regular time, than in input mask will be fine but realize that if you use 00:00, you can't enter 1:30, it must be 01:30.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32654

            #6
            Originally posted by sillyr
            The error is occurring for both fields and the error message that I stated in my original post is:
            ...
            Apologies Sally. You're quite right and I missed that.
            Originally posted by sillyr
            The data that the user is entering is the date with the input mask 00/00/000
            and the time with the input mask 00:00
            date & time are entered separately into two different fields
            I'm really looking for the actual values attempted. Was it "11409" (I'm assuming US locale)? Was it "01142009"? Or even "01/14/2009"? Bear in mind we're talking characters typed on the keyboard rather than what is displayed in the control.

            Welcome to Bytes!

            PS. Interesting user name :)

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32654

              #7
              I just refreshed this but then noticed the mask used for the date. Were you aware that the date mask you've posted has 3 (three) digits for the year?

              I expect this would ensure that no valid entry could ever be entered.

              Comment

              • sillyr
                New Member
                • Oct 2007
                • 37

                #8
                Sorry that was a typo I did mean 0000 for the year. I decided to change the operating system on my users computers so that they would be using Access 2007 like me to avoid any other problems. Thanks for the advice.

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32654

                  #9
                  Fair enough. We'll consider this thread done then :)

                  Comment

                  Working...