Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2011
    Location
    Chicago
    Posts
    37

    Question Unanswered: Need help with Delete Query

    I have a listboxes set up to move items from one to the other. I've already set up the button to add the selection to the other list box. Now I need to set up the remove button using queries and macro in order to remove any items not needed on the listbox. I've never ran a delete query and was wondering if anyone can help with this talk. Greatly appreciated, thanks.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Code:
    DELETE FROM <TableName> WHERE <ColumnName> = <SomeValue>;
    As usual the WHERE part is optional. If you omit it you'll delete the whole contents of the table.
    Have a nice day!

  3. #3
    Join Date
    Jul 2011
    Location
    Chicago
    Posts
    37
    Actually I need the Macro cause I'm not using VBA to set this up.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    This is not VBA, it's SQL. Create a query with it and run the query from a macro.
    Have a nice day!

  5. #5
    Join Date
    Jul 2011
    Location
    Chicago
    Posts
    37
    I see now, thanks for the clarification.

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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