Results 1 to 8 of 8

Thread: Date question

  1. #1
    Join Date
    Apr 2003
    Posts
    16

    Question Unanswered: Date question

    I have a data-entry form in my database that uses the function =Date() in the default value of a text box to return the current date. This function works fine on my PC, but I just split the database, since this is going to be a multi-user database, and I installed the front-end on some of my co-workers PCs, and it's giving me a #Name error using that function. I tried =Now() and that works, but I just want the date, not the time.

    Does anyone know what the problem is? I'm assuming it's something simple, but, I'm not sure.

    Also, my PC a Win98 machine, and the other ones I've tried it are 2000 machines, but both are running Access 2K. Don't know if that makes a difference, but I don't know why it would.

  2. #2
    Join Date
    Apr 2003
    Posts
    16
    I also get the following error when trying to open the table that is the record source for my form:

    *You may have used a DoEvents, LBound, UBound Spc, or Tab in an expression

    *You may have used an SQL aggregate function such as Count in a design grid or in a calculated control or field

  3. #3
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb If it works

    Just change the format of the text box to "Short Date"

    Does that do what you want it to?

  4. #4
    Join Date
    Nov 2002
    Location
    Hamilton,Ontario
    Posts
    132

    Re: Date question

    Date() and Short Date both will do .I am attaching an example take a look at it.
    Attached Files Attached Files

  5. #5
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb OK?

    Try this>

    Format changed at table level and form level

    default for field is now()
    Attached Files Attached Files

  6. #6
    Join Date
    Apr 2003
    Posts
    16

    Re: Date question

    Originally posted by VBAPROGRAMMER
    Date() and Short Date both will do .I am attaching an example take a look at it.
    Date() doesn't work. It will work on my PC, but not on the PC running Win2K. I even tried copying the front-end from my PC to the other one, and it still doesn't work. Now() works, but even with the format set to short date in both the table and form it still returns the time also. I guess it doesn't really matter if the time is stored also, as long as my queries that use a date range will still work with the time being stored in the date field. I just don't understand why it works on one PC and not the other. Maybe I'll copy it to a couple of other PCs and see if I get the same problem.

  7. #7
    Join Date
    Apr 2003
    Posts
    16
    Well, its seems like nothing else in the form works either, I try to enter a value in the first field and it gives me an error that says:

    Function is not available in expressions in table level validation expression.

    But if I click on on that messagebox I can then enter a value in the field without getting any errors.

    Is there something I need to do when I split the database? It seems wierd that I can access everything fine on my computer, but not from anyone elses.

  8. #8
    Join Date
    Apr 2003
    Posts
    16
    OK, I found the problem. I had a reference set to something called mmcalendar control, so I cleared it and now it works.

    Thanks for your help everybody.


    Jason

Posting Permissions

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