Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    delete records in a field (Access 2000)

    I want to delete all the records in the field France from the table products. At first i tried to
    convert my select query which is the following
    SELECT products.Productid, products.grade, products.France
    FROM products;

    into an update query and carry out the command. But somehow my command does not work.
    Can somebody help me?I want to delete all the records form the field France and make all the values to be 0.
    My failed command is the following:

    Private Sub Command589_Click()
    Current db.Execute "Update Products products.Productid, products.grade, products.France FROM products WHERE Products.France = 0"
    End Sub
    I will be very grateful for any help regarding deleting the field in a table.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: delete records in a field (Access 2000)

    Your question is a bit confusing but if you want to replace in the field France the word "France" by "0" in all the record where it appear you have to use :

    UPDATE products SET products.France = "0" WHERE products.France = "France"

    I'm not sure if this is what you want, so try this on a copy of your data.
    Francois

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: delete records in a field (Access 2000)

    I'm confused by your wording ... Do you mean that you want to change (update) all the data values in the field France to 0? Or do you mean that you want to delete the field France from all the records? Or do you mean that you want to delete all the records that have a data value in the field France?
    I'll offer a suggestion if you can clarify your meaning.

Posting Permissions

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