473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

pause "on current"

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
3 2734
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bill N. | last post by:
Using VB .Net 2003 Standard Edition. This simple form has a "File in Use" problem while the executable is running. Created this simple program to make sure that I hadn't done something in my...
11
by: Paul D.Smith | last post by:
Can Python create a variable "on-the-fly". For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ....to output... the grouch
11
by: David | last post by:
Comments on a program called PHP Page Generator? ( http://www.phppagegenerator.com) I received a email offer of $100 and the product appears to allow quick generation of code for SQL web...
4
by: Davids | last post by:
darn stuck again! in my string array string myArray = string; Let's say I've put a string field into the first 3 items and I guess the other 23 must then be null, right? OK so is there any C#...
3
by: JimM | last post by:
I am trying to create a method in VS 2003 that validates an object argument is of the proper type and within a range of values. I am trying to use a Type to define the casting and object type for...
8
by: Bruce | last post by:
I am using VB in Vs2005. Am I missing something or does VB not have the concept of "builds" (release/debug) like in VC? I wrote an assembly and I would like to have a debug version of the DLL...
1
by: =?Utf-8?B?R2FuZXNoIE11dGh1dmVsdQ==?= | last post by:
Hello All, Our application write logs to a file in a folder. Before our application starts writing to that file, I want to check if the current user has write access to that file, for example,...
1
by: Wazza | last post by:
G'Day, I have a re-occurring problem and wish to design a framework or pattern to address it. I have some Ideas but I would like to do some brainstorming with my peers before commencing. The...
9
by: Giampaolo Rodola' | last post by:
Hi, I'm trying to solve a jython-related issue and I discovered a different behavior affecting os.path.isabs between CPython and Jython. C:\Python23>python.exe Python 2.3.5 (#62, Feb 8 2005,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.