Delete record from table using a list box

B

bigbore50

Hello all

I have a form that has a list box (lst1)
This list box runs a query (qry1) that populates the list box
(qry1) gets it's data from (table1)

(table1) show
PDN Month Date

(qry1) shows
PDN Month Date Day of week Day of month

(lst1) shows
PDN Month Date Day of Week Day of Month

What i want to do is double click a selection in the list box (lst1)
and delete that record in (table1) based on
The PDN, Date, and Month in the list box.... i only want to delete the
record that exactaly matches
The PDN, Date, and Month

I have tried many things including this:
DoCmd.RunSQL "delete * from [tbl_audits scheduled] where pdn =
[lst_scheduledAudits].column(0, varitem) and date =
[lst_scheduledAudits].column(3, varitem)

I thought that may work
but it doesn't at all

How can i make it work?

Thank for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top