Remove a person from a list

C

ChuckW

Hi,

I have a master table called attendees with names,
addresses and a mailing list table called MailList. The
mail list has a combo box for adding people to the
MailList table. This combo box is based on a query called
NameQuery which looks up people in the attendees table.
There is field also a check box called inactive. I have
create a continuous form that shows everyone on the
mailing list and whether or not they are inactive. If
they are inactive there is a check box next to them.
What I want to do is to create a button outside of this
form which removes everyone from the MailingList table
who are inactive. After clicking this button, when I go
back to my continuous form the people who were marked as
inactive have been removed from the list.

Can anyone help?

Thanks,

Chuck
 
S

SteveS

ChuckW said:
Hi,

I have a master table called attendees with names,
addresses and a mailing list table called MailList. The
mail list has a combo box for adding people to the
MailList table. This combo box is based on a query called
NameQuery which looks up people in the attendees table.
There is field also a check box called inactive. I have
create a continuous form that shows everyone on the
mailing list and whether or not they are inactive. If
they are inactive there is a check box next to them.
What I want to do is to create a button outside of this
form which removes everyone from the MailingList table
who are inactive. After clicking this button, when I go
back to my continuous form the people who were marked as
inactive have been removed from the list.

Can anyone help?

Thanks,

Chuck


If by "removes everyone" you mean Delete then from the table, create a select
query that selects the records you want to delete, then change it to a delete
query. In the code for the button, run the query.

If "removes everyone" means don't show them in combo boxes, forms, reports, etc
then in the queries, drag the 'inactive' field down to the grid, uncheck the
'Show' checkbox and put FALSE in the criteria row.

HTH
 

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