error 3021

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am writing an Access application using macros. I have a form with several
subforms that are used for data reference or data selection only. The
purpose of the form is to select the desired "package" from the available
"packages" as displayed in the "package" list. Once selected, the
"package's" items are displayed. I then cycle through the "package items",
making choices when there is one (like a menu selection if the package item
is a ticket to a banquet). All is working nicely except whan I select the
last "package" from the list of available "packages". If I exit the form
(close the form) after making all choices from the last "package" in the
list, I get the No Current Record error - # 3021. When exiting the form
after making the selections from all other "packages", there isn't any error.

How do I get around this problem - using macros. Using Access 2003

Thanks,

Chuck
 
Chuck,

This is difficult to specifically track down, on the basis of the
information you have told us so far. There must be a macro, or a VBA
procedure, that runs on one of the events on your form. May be (just
guessing) the After Update or the Before Update event of the form
itself, or After Update or Exit or Lost Focus events of the last control
on the subform, or some such. Can you try and identify which macro is
causing the error? Maybe by a process of elimination?
 
Steve, I appreciate your response, but, the only macro on the base form is
one to maximize it on "got focus". All subforms do not have any macros
associated with them. I have put a "Run Command" macro with the "SingleStep"
option in the "close" macro and it always fails on the "close" step. I have
used the "GoTo Record" macro to positions the data behind the base form at
the beginning of the file and at the end with no change in results. The
reason it is so perplexing is that it only occurs when the last record in the
base query is processed, and then, not all the time. By that, I mean that if
I add a new "package", which places it at the end of the data stream, it may
cause the error and it may not, but if it does, it fails every time.

Chuck
 
Back
Top