473,666 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Something strange about Form_Current

In Access 97, in the Form_Current routine of a form, I call another
routine that repopulates and recomputes everything. However, a SQL
Select statement that I initiate from DAO that refers to a function of
mine errors out, claiming that the function does not exist. However, if
I move the call to that same routine to various places other than the
Form_Current routine, it works just fine! It appears that Jet/Access is
somehow unable to find functions in SQL statements if Form_Current is
anywhere in the call list!!!

Do you have ANY idea as to what might be happening here?

Thanks in advance for even your wildest ass of guesses.

Steve Richfie1d
May 11 '06 #1
2 2919
On Wed, 10 May 2006 16:38:13 -0600, Steve Richfie1d
<St***@NOSPAM.s mart-life.net> wrote:

Here is a WAG: check the call stack when the error occurs. Perhaps
there is some unexpected recursion going on? "repopulate s and
recomputes" could easily re-invoke the Current event.

Otherwise, use the proven debug technique of reducing the problem to
its essential components. You may then want to post that code here.

-Tom.
In Access 97, in the Form_Current routine of a form, I call another
routine that repopulates and recomputes everything. However, a SQL
Select statement that I initiate from DAO that refers to a function of
mine errors out, claiming that the function does not exist. However, if
I move the call to that same routine to various places other than the
Form_Current routine, it works just fine! It appears that Jet/Access is
somehow unable to find functions in SQL statements if Form_Current is
anywhere in the call list!!!

Do you have ANY idea as to what might be happening here?

Thanks in advance for even your wildest ass of guesses.

Steve Richfie1d


May 11 '06 #2
Tom,
Here is a WAG: check the call stack when the error occurs. Perhaps
there is some unexpected recursion going on? "repopulate s and
recomputes" could easily re-invoke the Current event.
Everything was clean and as expected.
Otherwise, use the proven debug technique of reducing the problem to
its essential components. You may then want to post that code here.


I had pretty much done that to get it down to being the Form_Current event.

The quick-and-dirty fix (hold your nose!) that I just put in was to put
the call to the routine to repopulate and recompute things into the
timer along with a line to clear the TimerInterval, and set the
TimerInterval to 1 in the Form_Current routine to trigger the timer
immediately (in 1ms) following the Form_Current event. Of course I would
prefer to rip that mess out and "do it right" however that might be, but
at least I got the code running for now while I look for a better way.

Timers have long been used to cover problems with events, e.g. the lack
of an "Opened" event. The problem in Access (vs. VB) is that you only
get one timer per form, so you had better pray that you don't have more
than one such problem per form.

Thanks for taking a shot at my mess.

Steve Richfie1d
=============== ========
In Access 97, in the Form_Current routine of a form, I call another
routine that repopulates and recomputes everything. However, a SQL
Select statement that I initiate from DAO that refers to a function of
mine errors out, claiming that the function does not exist. However, if
I move the call to that same routine to various places other than the
Form_Curren t routine, it works just fine! It appears that Jet/Access is
somehow unable to find functions in SQL statements if Form_Current is
anywhere in the call list!!!

Do you have ANY idea as to what might be happening here?

Thanks in advance for even your wildest ass of guesses.

Steve Richfie1d


May 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1460
by: Karl Roes | last post by:
Hi All, I have a form with a standard combo box and 5 tabs in A2003. On Form Open, I set Me.Detail.Visible = False and in the after update event of the combo set Me.Detail.Visible = True,( to open form with no info showing ) I've noticed something quite strange. I open the form ( details are not visible ) select any record ID with the combo and the details come up OK. I click anywhere on the
1
3083
by: L.H. | last post by:
I'm having an issue with my "Single Form". There is a vertical scrollbar that is used to view all fields on the form. During the Form_Current procedure, I perform some checks of values and based on those values I set some fields to not be enabled. At the end of the Form_Current procedure, I set focus to the field at the top of the form. The problem is that the form does not scroll all the way to the top of the form - it just goes...
1
1404
by: Sri | last post by:
When I try to set a value to a bound control in the Form_current event, Access crashes and tries to create a report to Microsoft. If I comment out this code, it works fine. Any help would be great. Thanks, Sri
0
997
by: harrylmh | last post by:
Hi, I found something strange about the mouse's X,Y coordinates. Here's a program I made for testing. Start by moving your mouse over the Label on the left, then...move your mouse slowly from left to right until it goes out of the label. You'll see the inconsistency in the X property. When you move out of the label the X value seems to increment by a number pixels. The same is true for the Y coordinate if you go vertical. Anyone knows...
2
6316
by: Bob Darlington | last post by:
When I run the following code from a continuous form's Current event: Set ctrl = Me.ActiveControl I get an error 2474 - 'The expression you entered requires the control to be in the active window'. I've tested it in simple (1 field) forms with no other code, and get the same result. Is it not possible to get this value from the Form_Current event? Screen.ActiveControl gives the same result. --
3
1864
by: Beemer Biker | last post by:
I started seeing huge amounts of error messages such as "Validation (XHTML 1.0 Transitional):" Element schema is not supported". There was nothing wrong with that for 3 weeks and suddenly there is. ======check out this bug========= OK: I have the following code and the phrase khaki is underlined in red as VS8 thinks something is wrong: <input id= .... height: 24px; background-color: khaki;"
6
1257
by: =?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?= | last post by:
Hello i just encountered a funny situation Dim i As Integer = 0 MsgBox(i = Nothing) and
5
7272
by: questionit | last post by:
Hi I am finding it difficult to use Form_Current() event of a subform. It gets called automatically. I changed the tab order so that the Sub Form with Form_Current() event came first or in the end in the order; but this doesn't resolve the problem. Interestingly, if one of the controls on the form gets focus, the Form_Current() gets called. Any idea how to get rid of this?
2
3122
by: TrueColors | last post by:
I have a project with VBA and i want to re-write it with VB 2003 but i can't find the equivalent of event "Current" (Form_Current -- vba) in VB 2003. Can anyone help me please. Many thanks.
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.