A
Alastair MacFarlane
Dear All
I have 2 forms: Form A and Form B. On form A I have a
ComboBox that loads values from a table. The ComboBox has
its "LimitToList" set to true because it is bound to
column 2 of the Rowsource property. When I want to add a
new record to the table and appear in the ComboBox, I
double-click the ComboBox to open up form B to add a new
value, save the new record, and requery the combobox in
Form A, and close form B.
Most of the time it works fine, with one exception, if a
user enters a value not on the list of the ComboBox,
double-clicks it to add a new record on Form B and runs
the Requery action on the ComboBox, I get the error:
Error 2118: You must sve the current field before you run
the requery action.
I have tried, more in desperation than understanding a
possible solution, to look at Sendkeys "{ESC} {ESC}" or
setting the ComboBox to "". Neither will work. I cannot
save Form A because there are other foreign key values
that must be added to save the record.
Can anyone suggest a possible solution?
Thanks again.
Alastair MacFarlane
I have 2 forms: Form A and Form B. On form A I have a
ComboBox that loads values from a table. The ComboBox has
its "LimitToList" set to true because it is bound to
column 2 of the Rowsource property. When I want to add a
new record to the table and appear in the ComboBox, I
double-click the ComboBox to open up form B to add a new
value, save the new record, and requery the combobox in
Form A, and close form B.
Most of the time it works fine, with one exception, if a
user enters a value not on the list of the ComboBox,
double-clicks it to add a new record on Form B and runs
the Requery action on the ComboBox, I get the error:
Error 2118: You must sve the current field before you run
the requery action.
I have tried, more in desperation than understanding a
possible solution, to look at Sendkeys "{ESC} {ESC}" or
setting the ComboBox to "". Neither will work. I cannot
save Form A because there are other foreign key values
that must be added to save the record.
Can anyone suggest a possible solution?
Thanks again.
Alastair MacFarlane