Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jun 2004
    Location
    Oxford, Oxfordshire, United Kingdom
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dates in update queries (2000)

    silly question probably, but no book will tell me intelligibly. I want an update query, among other things, to change a date field to today's date. What do I put in the 'update to' field: It doesn't like Date() or #date#, and I can't see what to do. Nor can I believe that this is impossible.

    thanks in advance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dates in update queries (2000)

    You should be able to use <code>Date()</code> in the 'Update to' line. You mention that Access doesn't like that - do you get an error message? If so, what does it say?

  3. #3
    3 Star Lounger
    Join Date
    Jun 2004
    Location
    Oxford, Oxfordshire, United Kingdom
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dates in update queries (2000)

    thanks. It tells me that it's not updating because of a lock violation--and then gives me the option of letting it do the rest of the update, which it manages fine.
    The underlying table sets current date as a default, but it's editable manually, even in the select query, without any problem.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dates in update queries (2000)

    A lock violation has nothing to do with what expression you use in the 'Update to' line. It means that some records have been locked because they're being edited by another user (or another process). Is this a multi-user database?

  5. #5
    3 Star Lounger
    Join Date
    Jun 2004
    Location
    Oxford, Oxfordshire, United Kingdom
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dates in update queries (2000)

    many thanks indeed. There were issues about the fact that a form dependent on the same query was open at the same time, and I think I've now solved it.

    what would I do without this resource?!

Posting Permissions

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