Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Nov 2001
    Location
    Newark, New Jersey, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date Issues (XP & 2000)

    I've used an Is Now () command as a default value for a text field. I tested on three computers - 2 of them running WinNT with Office XP, and the third running Win2000 and Office 2000... all three it worked fine and showed the proper date. When I tried running the same database on several WinNT with Office 2000 computers, it shows up as ?Name#. I've checked the regional settings and all are the same. Any thoughts as to what would cause this?
    Since I was having the above problem, I figured I'd try setting the default date through vb instead - to see if maybe this would work. When I run the following code, I get a default date of 12/30/1899. I thought maybe since I have it set as a date (short date) field in the table, that maybe this was causing the problem... so I tried turning it into a text field. At which point now instead of displaying a date, it displays a huge number - which I believe is the result of access turning the date into long division since it uses "/" to separate the numbers. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    I just need to get the date field to populate correctly on all systems. Any suggestions would be greatly appreciated.

    Thanks!
    Rich

    Dim vcurrentDate
    vcurrentDate = Date
    Me.datStartDate.DefaultValue = vcurrentDate

    PS. I'm working with Access XP in an Access 2000 database.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Date Issues (XP & 2000)

    Is Now()? Doesn't that give you a boolean value? What's wrong with just Now()? The 12/30/1899 looks like the result when you have a time but no date (or a non-date vlaue) in a date field.
    Charlotte

  3. #3
    Lounger
    Join Date
    Nov 2001
    Location
    Newark, New Jersey, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Issues (XP & 2000)

    Charlotte,

    I goofed when I typed the post earlier... I just looked and it is the =Now() expression that I'm using. Still weird how it works on some pc's but not others.

    I'll have to try changing the date field from short date to some of the other options to see if that alleviates the 12/30/1899. Even if I get this method to work... we'll have to see if I have the same problem as I first described with the #Name?.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Date Issues (XP & 2000)

    It sounds to me as if you may have a missing reference. Do Tools/References in VBA and see if everything you need is there on the NT PCs.
    Wendell

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Issues (XP & 2000)

    The #Name error would indicate that a reference to the library containing the Now function is missing. In the tools menu select References and see if any are tagged as missing.
    Legare Coleman

  6. #6
    Lounger
    Join Date
    Nov 2001
    Location
    Newark, New Jersey, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Issues (XP & 2000)

    Thanks for the info... I checked the references, and all match. I changed the =Now() to =Date() to see if that would work... and it did on my pc, at least for a little while. I went to the NT with Access 2000 pc, and still no go. When I came back to my pc, mine shows #Name? too! Go figure... sometimes it works, sometimes it doesn't. I've tried changing the format of the field, input masks... guess I haven't figured out the magical combination yet.
    Any additional thoughts would be appreciated. <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15>

    Rich

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Date Issues (XP & 2000)

    Is this a database that lives on a server and is shared by multiple users? If so, do all the machines map the drives the same way? If not, or if a reference is to a local file rather than a mapped file, that could be your problem.
    Charlotte

  8. #8
    Lounger
    Join Date
    Nov 2001
    Location
    Newark, New Jersey, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Issues (XP & 2000)

    Hi Charlotte,

    Yeah, this is a database that lives on a server that's automatically mapped the same through their profile. I ended up calling Microsoft and asking them about the problem. It appears each computer has a different version of Jet 4.0 running. They had me download and install the most current version of Jet 4, and everything appears to be working.

    Thanks for everyone's input, it seems the problem is resolved, but I'll let you know if I run into any further complications with this.

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Date Issues (XP & 2000)

    Oh, yes! I've been bitten by that one many times because the IT people seem to think that once you install the Office service packs, that's all that's needed. I make it a habit to *always* install the jet service packs on my machines and then demand that they be installed on the others when the apps break there! <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>
    Charlotte

Posting Permissions

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