|
Home > Archive > MS Access database support > February 2006 > pause "on current"
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
pause "on current"
|
|
|
| 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
| |
| Ken Snell 2006-02-18, 8:24 pm |
| 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" <texson552000@yahoo.com> wrote in message
news:LeKJf.27778$7y1.19350@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
>
>
| |
| Doc Holiday 2006-02-20, 1:24 pm |
| 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" < kthsneisllis9@ncoomc
astt.renaetl> wrote in message
news:xY-dnbTaUN7fOWreRVn-rg@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" <texson552000@yahoo.com> wrote in message
> news:LeKJf.27778$7y1.19350@tornado.texas.rr.com...
that[color=darkred]
function[color=darkr
ed]
A.[color=darkred]
found.[color=darkred]
the[color=darkred]
form[color=darkred]
the[color=darkred]
>
>
| |
| Ken Snell 2006-02-21, 3:24 am |
| Post the code you're using in the Current procedure.
--
Ken Snell
<MS ACCESS MVP>
"Doc Holiday" <texson552000@yahoo.com> wrote in message
news:lZnKf.28377$7y1.9502@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" < kthsneisllis9@ncoomc
astt.renaetl> wrote in message
> news:xY-dnbTaUN7fOWreRVn-rg@comcast.com...
> that
> function
> A.
> found.
> the
> form
> the
>
>
|
|
|
|
|