Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    update question (Access 2000)

    My update function does now show any erors but does not function.May i have some help ? In my function i want to
    delete the dates for those orders, that have the field paymentid = 0.
    I have built the following function, but on execution the dates for the fields with paymenbtid = 0 are not deleted.
    Why?
    Thank you in advamce

    Dim sqlString As String
    sqlString = " Update orders SET invoicedate = Null WHERE PaymentID Is Null"
    CurrentDb.Execute sqlString
    End Function

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: update question (Access 2000)

    That is because you are testing PaymentID to Null, what you need is:

    sqlString = " Update orders SET invoicedate = Null WHERE PaymentID Is Null or PaymentID = 0"

  3. #3
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update question (Access 2000)

    Thank you ! Your correction did the job and i have deleted what i wanted!

Posting Permissions

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