C
ChuckW
Hi,
I have two tables - Attendees and MailingList, with a
common field called ID. The Attendees tables had name,
address, phone and a field called Inactive. There is a
continuous form called AddAttendees which is designed to
make changes to the Attenddes table. On this form is a
checkbox called "Inactive". What I am trying to do is to
delete everyone in the MailingList table who had a check
in the Inactive field of the AddAttendees form.
I created a delete query which will successfully do
this. I then created a macro called CloseAndDelete.
What it does is to Close the AddAttendees form and run my
delete query. I have a lable called Exit - it appear to
the user as an exit button for getting out of the
AddAttendee form. The problem is that when I mark
several people as inactive, and then click the exit
button (ie my macro) and then check the MailingList
table, the last record does not get deleted. If I mark
several people as inactive and then press my tab key and
then exit (run my macro) it does work.
In my macro I created a SendKeys and typed in "{tab}" but
this didn't solve the problem. For some reason it is not
recognizing my last selection of inactivating someone.
When I run the macro separately it does work.
Can anyone help?
Thanks,
Chuck
I have two tables - Attendees and MailingList, with a
common field called ID. The Attendees tables had name,
address, phone and a field called Inactive. There is a
continuous form called AddAttendees which is designed to
make changes to the Attenddes table. On this form is a
checkbox called "Inactive". What I am trying to do is to
delete everyone in the MailingList table who had a check
in the Inactive field of the AddAttendees form.
I created a delete query which will successfully do
this. I then created a macro called CloseAndDelete.
What it does is to Close the AddAttendees form and run my
delete query. I have a lable called Exit - it appear to
the user as an exit button for getting out of the
AddAttendee form. The problem is that when I mark
several people as inactive, and then click the exit
button (ie my macro) and then check the MailingList
table, the last record does not get deleted. If I mark
several people as inactive and then press my tab key and
then exit (run my macro) it does work.
In my macro I created a SendKeys and typed in "{tab}" but
this didn't solve the problem. For some reason it is not
recognizing my last selection of inactivating someone.
When I run the macro separately it does work.
Can anyone help?
Thanks,
Chuck