Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Portland, Maine, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refering to a listboxs column property in sql (Access 97)

    I'm trying to delete a record in a table based on the values of a text box and listbox on a form. I'm having trouble with the second part of the where statement. Can you refer to the column property of a listbox in an sql statement?

    DELETE tblControlTypeJunction.*, tblControlTypeJunction.IncidentID, tblControlTypeJunction.ControlTypeID
    FROM tblControlTypeJunction
    WHERE (((tblControlTypeJunction.IncidentID)=[forms]![frmIncident]![txtIncidentNumber]) AND ((tblControlTypeJunction.ControlTypeID)=[forms]![frmIncident]![lstControlType].Column(0)));

    Let me know if I need to explain further.
    Thanks for any help with this.
    Don

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Refering to a listboxs column property in sql (Access 97)

    It depends. If this is a multiselect listbox, your SQL won't work at all.
    Charlotte

Posting Permissions

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