Good morning Gurus,
I'm trying to execute the following code to run multiple queries, and update the progress bar on a form, but it doesnt seem to respond. Do I have too many queries, what am I missing? Please find the code below: -
Private Sub Run_Click()
-
DoCmd.Hourglass True
-
'Turns off the Access warning messages here
-
DoCmd.SetWarnings False
-
-
Dim stDocName As String
-
-
stDocName = "Query1"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 5
-
-
stDocName = "Query2"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 10
-
-
stDocName = "Query3"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 15
-
-
stDocName = "Query4"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 20
-
-
stDocName = "Query5"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 25
-
-
stDocName = "Query6"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 30
-
-
stDocName = "Query7"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 35
-
-
stDocName = "Query8"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 40
-
-
stDocName = "Query9"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 45
-
-
stDocName = "Query10"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 50
-
-
stDocName = "Query11"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 55
-
-
stDocName = "Query12"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 60
-
-
stDocName = "Query13"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 65
-
-
stDocName = "Query14"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 70
-
-
stDocName = "Query15"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 75
-
-
stDocName = "Query16"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 80
-
-
stDocName = "Query17"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 85
-
-
stDocName = "Query18"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 90
-
-
stDocName = "Query19"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
Me![MyProgress].Value = 100
-
-
DoCmd.Hourglass False
-
'Turns the Access warning messages back on here
-
DoCmd.SetWarnings True
-
End Sub
1 2256 nico5038 3,080
Recognized Expert Specialist
There's nothing odd with your code.
Best to place a breakpoint (click on the left ruler to get a dot) on the first statement. Then open the form and click the button.
The code will halt on the first statement and using F8 you can step line by line through the code.
When nothing happens when you click, then check or the button has code in the Onclick event.
Nic;o)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Javier Fernandez |
last post by:
We just migrate out p690 from kernel 32 bits to kernel 64 bits in
order to migrate DB2 v7 to DB2 v8 FP3.
The only problem without a solution we find out is since we did the
change we cannot run...
|
by: BlackFireNova |
last post by:
Using Access 2002
I am writing a report which draws data from several different tables. I
can't link all the tables in a query, as some can not be related without
truncating the data. I plan...
|
by: Jeremy |
last post by:
I have built a form that calls queries. I have the first 2 set up as
select queries, and the third set up as a make table query. When
multiple users are on this application at the same time, they...
|
by: dskillingstad |
last post by:
I've been struggling with this problem for some time and have tried
multiple solutions with no luck.
Let me start with, I'm a novice at Access and I'm not looking for
someones help to design my...
|
by: fong.yang |
last post by:
I've got a database with about 300,000 records. There are several
different tables that are set up the same way with identical fields. I
have the same queries individually set up for each table. ...
| |
by: writeson |
last post by:
Hi all,
I'm wondering if anyone has tried a scenario that I'm thinking of. At
my job we've got a web based product provided by Apache running PHP
that accesses MySQL. This web application is...
|
by: Christoph Haas |
last post by:
Hi, list...
I have written an application in Perl some time ago (I was young and needed
the money) that parses multiple large text files containing nested data
structures and allows the user to...
|
by: Daz |
last post by:
Hi. I am trying to select data from two separate MySQL tables, where I
cannot use join, but when I put the two select queries into a single
query, I get an error telling me to check my syntax. Both...
|
by: Supermansteel |
last post by:
My team at work uses Cognos to run multiple queries to pull in data. Then they take that data and import into Access and then usually run an Append Query to run a RND function to pull out a few...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| | |