By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,544 Members | 2,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,544 IT Pros & Developers. It's quick & easy.

pause "on current"

P: n/a
RR
I have a button on a form (form A) that opens another form. The form that
opens (form B) has a listbox that is populated with a call to a function in
the "on current" event.
When form B with the listbox has a query listed as the data source, it works
fine.
In this case, the button on form A sets the record source for form B to one
of several queries, depending on what is selected in a combobox on form A.

When Form B first opens, an error comes up that a field can not be found.
Once the form opens, advancing the records fires the "on current" and the
listbox fills as it should.

It appears that the on current fires before the data is loaded in the form
on the initial opening??? Is there a way to make sure the data is in the
form before the on current fires, and still not list a query as the data
source?

Thanks
Feb 18 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
The current event will occur when a form opens; you cannot cancel it nor
stop it. In your situation, why not just trap for the error and exit the
Current sub if it occurs?

--

Ken Snell
<MS ACCESS MVP>

"RR" <te**********@yahoo.com> wrote in message
news:Le*******************@tornado.texas.rr.com...
I have a button on a form (form A) that opens another form. The form that
opens (form B) has a listbox that is populated with a call to a function
in
the "on current" event.
When form B with the listbox has a query listed as the data source, it
works
fine.
In this case, the button on form A sets the record source for form B to
one
of several queries, depending on what is selected in a combobox on form A.

When Form B first opens, an error comes up that a field can not be found.
Once the form opens, advancing the records fires the "on current" and the
listbox fills as it should.

It appears that the on current fires before the data is loaded in the form
on the initial opening??? Is there a way to make sure the data is in the
form before the on current fires, and still not list a query as the data
source?

Thanks

Feb 18 '06 #2

P: n/a
I have tried trapping error 2424 in the "on open" in the "on current" and in
the "on click" of the button that opens the form, and the error still
apears.

Is there a better way to handle the data to stop this error, short of having
several identical forms with each having its own query listed?
"Ken Snell" <kt***********@ncoomcastt.renaetl> wrote in message
news:xY********************@comcast.com...
The current event will occur when a form opens; you cannot cancel it nor
stop it. In your situation, why not just trap for the error and exit the
Current sub if it occurs?

--

Ken Snell
<MS ACCESS MVP>

"RR" <te**********@yahoo.com> wrote in message
news:Le*******************@tornado.texas.rr.com...
I have a button on a form (form A) that opens another form. The form that opens (form B) has a listbox that is populated with a call to a function in
the "on current" event.
When form B with the listbox has a query listed as the data source, it
works
fine.
In this case, the button on form A sets the record source for form B to
one
of several queries, depending on what is selected in a combobox on form A.
When Form B first opens, an error comes up that a field can not be found. Once the form opens, advancing the records fires the "on current" and the listbox fills as it should.

It appears that the on current fires before the data is loaded in the form on the initial opening??? Is there a way to make sure the data is in the form before the on current fires, and still not list a query as the data
source?

Thanks


Feb 20 '06 #3

P: n/a
Post the code you're using in the Current procedure.

--

Ken Snell
<MS ACCESS MVP>

"Doc Holiday" <te**********@yahoo.com> wrote in message
news:lZ******************@tornado.texas.rr.com...
I have tried trapping error 2424 in the "on open" in the "on current" and
in
the "on click" of the button that opens the form, and the error still
apears.

Is there a better way to handle the data to stop this error, short of
having
several identical forms with each having its own query listed?
"Ken Snell" <kt***********@ncoomcastt.renaetl> wrote in message
news:xY********************@comcast.com...
The current event will occur when a form opens; you cannot cancel it nor
stop it. In your situation, why not just trap for the error and exit the
Current sub if it occurs?

--

Ken Snell
<MS ACCESS MVP>

"RR" <te**********@yahoo.com> wrote in message
news:Le*******************@tornado.texas.rr.com...
>I have a button on a form (form A) that opens another form. The form that > opens (form B) has a listbox that is populated with a call to a function > in
> the "on current" event.
> When form B with the listbox has a query listed as the data source, it
> works
> fine.
> In this case, the button on form A sets the record source for form B
> to
> one
> of several queries, depending on what is selected in a combobox on form A. >
> When Form B first opens, an error comes up that a field can not be found. > Once the form opens, advancing the records fires the "on current" and the > listbox fills as it should.
>
> It appears that the on current fires before the data is loaded in the form > on the initial opening??? Is there a way to make sure the data is in the > form before the on current fires, and still not list a query as the
> data
> source?
>
> Thanks
>
>



Feb 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.