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

    IsNull (Access 2000)

    I have the following task.In the table TblOffers with primary key OfferID, i have a field called OfferDate. In some cases the offer date is mising.
    I want to update the table so that all the blank offer dates to have the present day, or somethinglike that :
    Dim sql As String
    sql = " UPDATE TblOffers.*, TblOffers.offerid FROM TblOffers, TblOffers.OfferDate to show the present day,where TblOffer.OfferDate IsNull
    CurrentDb.Execute sql


    How can i do that ?

  2. #2
    4 Star Lounger
    Join Date
    Sep 2004
    Location
    Sacramento, California, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IsNull (Access 2000)

    Try:
    UPDATE tblOffer SET tblOffers.OfferTime = Date()
    WHERE (((tblOffers.OfferDate Is Null));
    Carla

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

    Re: IsNull (Access 2000)

    Carla has already solved your problem. If you want to execute SQL in VBA code, it often helps to create a query in design view, and test that it does what you want. Then select View | SQL and you will see the SQL "code" for the query. To use it in VBA, it will need some tweaking, but at least you'll have an idea what the SQL will look like.

Posting Permissions

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