Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    364

    Unanswered: How to delete the value stored in a Field of a Row?

    Hello,

    How do I delete a value from a field? I have a form with its record source set to a table (tbl1) and I want to move to a record e.g. record number 5, and then click a command button and delete field3's value so it is empty for that record.

    I have tried this in my command button, but it deletes the whole record, not just the value stored in field3 -
    Code:
    DoCmd****nSQL "DELETE tbl1.field3 FROM tbl1 WHERE (((tbl1.mainID)=[Forms]![main_frm]![mainID]) AND ((tbl3.field3)=[Forms]![main_frm]![
    [field3]));"

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    UPDATE myTable SET myColumn = NULL WHERE myID = 1337

  3. #3
    Join Date
    Aug 2004
    Posts
    364
    Brilliant, thankyou

Posting Permissions

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