R
Robin
A frustration for your consideration and help, please: I
have a macro which is working fine EXCEPT that the "Set
Warnings" action seems to not work as promised. This
macro is triggered by the "NotInList" event when an entry
made into a form's combo box is not on the lookup list.
All of the macro's actions function properly AFTER an
error box appears, announcing that "the entry is not on
the lookup list" -- when I then press ENTER (i.e., "OK" in
that error window), the macro proceeds to do what it's
supposed to do, i.e., it creates a new record in the
lookup's underlying table, adds the new entry to the
table, then, on the form, refreshes the combo box's lookup
list, enters the "new" entry, and tabs to the next field.
Why is the "Set Warnings" action not suppressing that
error box? (The box doesn't actually say "error": it has
an "i" in a balloon...)
The macro: ECHO (no), SET WARNINGS (no), SENDKEYS
({F2},Yes), RUNCOMMAND (Copy), RUNCOMMAND (Delete),
SENDKEYS ({ESC}{ESC},Yes), OPENTABLE
(BrandNames,Datasheet,Add), SENDKEYS ({TAB},Yes),
RUNCOMMAND (Paste), CLOSE (Table,BrandNames,Yes),
RUNCOMMAND (Refresh), RUNCOMMAND (Paste), SENDKEYS
({TAB},Yes)
I tried two things which did NOT succeed in suppressing
that error box: 1) I reversed the order of the first two
commands -- SET WARNINGS, then ECHO; 2) I added an ENTER
command to simulate my clicking on the "OK" button in the
box. The first solution had no effect. The second one
caused the program to crash!
Your help will be appreciated.
have a macro which is working fine EXCEPT that the "Set
Warnings" action seems to not work as promised. This
macro is triggered by the "NotInList" event when an entry
made into a form's combo box is not on the lookup list.
All of the macro's actions function properly AFTER an
error box appears, announcing that "the entry is not on
the lookup list" -- when I then press ENTER (i.e., "OK" in
that error window), the macro proceeds to do what it's
supposed to do, i.e., it creates a new record in the
lookup's underlying table, adds the new entry to the
table, then, on the form, refreshes the combo box's lookup
list, enters the "new" entry, and tabs to the next field.
Why is the "Set Warnings" action not suppressing that
error box? (The box doesn't actually say "error": it has
an "i" in a balloon...)
The macro: ECHO (no), SET WARNINGS (no), SENDKEYS
({F2},Yes), RUNCOMMAND (Copy), RUNCOMMAND (Delete),
SENDKEYS ({ESC}{ESC},Yes), OPENTABLE
(BrandNames,Datasheet,Add), SENDKEYS ({TAB},Yes),
RUNCOMMAND (Paste), CLOSE (Table,BrandNames,Yes),
RUNCOMMAND (Refresh), RUNCOMMAND (Paste), SENDKEYS
({TAB},Yes)
I tried two things which did NOT succeed in suppressing
that error box: 1) I reversed the order of the first two
commands -- SET WARNINGS, then ECHO; 2) I added an ENTER
command to simulate my clicking on the "OK" button in the
box. The first solution had no effect. The second one
caused the program to crash!
Your help will be appreciated.