I found a post with the same error here.
I'm getting the same error. This code is run in a button click event: -
...........
-
DoCmd.OpenForm CurTabViewName, acNormal
-
With Forms(CurTabViewName)
-
...........
-
At the "With" statement I get the error. Weird thing is this code had been working fine a long time. I've been searching the net and haven't been able to find the solution yet. Does anyone know a solution?
Only possibility I found out (from the above linked post) is that maybe it has to do with timing. I can imagine that the form is not completely ready when the "with" statement executes. Is there any way to tell access to wait until the form is completely loaded before executing the "with" statement?
3 7826 hyperpau 184
Recognized Expert New Member
have you tried putting a refresh, repaint, or recalc method in betweene these codes?
Access executes Command2 without waiting for Command1 to finish executing, which can, indeed, cause timing problems. In this case, my guess is that the form hasn't finished loading/opening when the next line of code tries to reference it.
Refresh, repaint, or recalc is going to do nothing to correct this. What does frequently help is to place the command DoEvents between two commands. DoEvents basically sends control from Access to Windows to allow Command1 to finish before returning control to Access to execute Command2.
Welcome to Bytes!
Linq ;0)> hyperpau 184
Recognized Expert New Member
Wow. That's new for me! :)
Thanks Missingling.
Access executes Command2 without waiting for Command1 to finish executing, which can, indeed, cause timing problems. In this case, my guess is that the form hasn't finished loading/opening when the next line of code tries to reference it.
Refresh, repaint, or recalc is going to do nothing to correct this. What does frequently help is to place the command DoEvents between two commands. DoEvents basically sends control from Access to Windows to allow Command1 to finish before returning control to Access to execute Command2.
Welcome to Bytes!
Linq ;0)> Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Simon Verona |
last post by:
I know this is a little of topic, for which I apologise, but I think it's pertinent to .Net development so I hope it's ok to ask this question here!
I'm looking to created filled in "forms" from my application eg Sales Orders, Quotations etc which have data filled in from my application. I want my users to be able to design their own form templates (eg to include their company logos, terms and conditions etc).
The standard .Net...
|
by: Woody Lemcke |
last post by:
Hello all,
Would you gurus please share your wisdom on any DB2 equivalents to the
Informix "Forms" input form utility and "Ace" report generating
utility? The input form will probably be accessed by telneting from a
Linux shell or Windows command prompt and used for updating a lab
database.
Thanks and regards,
Woody Lemcke
|
by: gmarquez |
last post by:
Hello,
I am using "FORMS" authentication, without SSL the behavior is normal, everythings working very well.
When in IIS I cheking "Require SSL" (in Secure Communications property), I can't to do login, after introducing the credentials, I am redirected to login's page again, If I take the SSL's Check off in the ISS property, everythings will work very well again.
NOTE: I have a valid certificate well installed.
What is happening?,...
|
by: Angel |
last post by:
Hi
I have a problem with my web applications. I believe the problem is
somehow connected to HttpSession.
I use form authentication in my project. Once I authenticate the user and
redirect to default page
I create an User object and assign this object to session.
Then in other forms I access this object and use it to load data from
database. Some times I keep
data in the object as a property of object. For example let say my object is...
|
by: Scott Johnson |
last post by:
Hi!
Is there a way to "preload" a form using a thread or something else so that
my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading
of the next form and controls done in the background while a user is still
entering data.
(For example, my user visits screen A then B then...
| |
by: Dib |
last post by:
Hi,
how do I call a form to open from another form.
example
I have a frmLogIn and an frmError
The frmError have a ListBox. If the frmLogin generated an error I want the
error to show in the ListBox on frmError.
|
by: Paul Helmuth |
last post by:
All,
(here's an easy one)...
This is probably a stupid question - please bare with me as I am new to
dotNet.
How does one reference objects on a form from a module? In 6.0 you could
simply provide the form name as a prefix to the object within the form and
that would do it (kind of like providing a fully qualified path name to a
|
by: Troy Bull |
last post by:
Greetings
I am trying to use a singleton to hold a group of forms. I have a
MDIMaster form. I have a class called Forms; Forms is a singleton. I
want to do something like the following.
In MDIMaster (and other forms), I want to get an instance of Forms (the
only instance). Inside Forms then there are public variables for each
of the possible forms, if a "form" has never been accessed the Forms
factory creates a new instance of the...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |