473,508 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running multiple queries through VB, no response?

matrekz42
37 New Member
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:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Run_Click()
  2.      DoCmd.Hourglass True
  3.      'Turns off the Access warning messages here
  4.       DoCmd.SetWarnings False
  5.  
  6.     Dim stDocName As String
  7.  
  8.     stDocName = "Query1"
  9.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  10.     Me![MyProgress].Value = 5
  11.  
  12.     stDocName = "Query2"
  13.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  14.     Me![MyProgress].Value = 10
  15.  
  16.     stDocName = "Query3"
  17.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  18.     Me![MyProgress].Value = 15
  19.  
  20.     stDocName = "Query4"
  21.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  22.     Me![MyProgress].Value = 20
  23.  
  24.     stDocName = "Query5"
  25.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  26.     Me![MyProgress].Value = 25
  27.  
  28.     stDocName = "Query6"
  29.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  30.     Me![MyProgress].Value = 30
  31.  
  32.     stDocName = "Query7"
  33.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  34.     Me![MyProgress].Value = 35
  35.  
  36.     stDocName = "Query8"
  37.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  38.     Me![MyProgress].Value = 40
  39.  
  40.     stDocName = "Query9"
  41.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  42.     Me![MyProgress].Value = 45
  43.  
  44.     stDocName = "Query10"
  45.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  46.     Me![MyProgress].Value = 50
  47.  
  48.     stDocName = "Query11"
  49.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  50.     Me![MyProgress].Value = 55
  51.  
  52.     stDocName = "Query12"
  53.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  54.     Me![MyProgress].Value = 60
  55.  
  56.     stDocName = "Query13"
  57.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  58.     Me![MyProgress].Value = 65
  59.  
  60.     stDocName = "Query14"
  61.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  62.     Me![MyProgress].Value = 70
  63.  
  64.     stDocName = "Query15"
  65.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  66.     Me![MyProgress].Value = 75
  67.  
  68.     stDocName = "Query16"
  69.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  70.     Me![MyProgress].Value = 80
  71.  
  72.     stDocName = "Query17"
  73.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  74.     Me![MyProgress].Value = 85
  75.  
  76.     stDocName = "Query18"
  77.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  78.     Me![MyProgress].Value = 90
  79.  
  80.     stDocName = "Query19"
  81.     DoCmd.OpenQuery stDocName, acNormal, acEdit
  82.     Me![MyProgress].Value = 100
  83.  
  84.     DoCmd.Hourglass False
  85.         'Turns the Access warning messages back on here
  86.         DoCmd.SetWarnings True
  87. End Sub
Oct 18 '07 #1
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)
Oct 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1349
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...
6
6073
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...
1
3427
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...
11
4501
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...
1
3391
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. ...
5
2290
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...
0
1587
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...
7
2712
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...
14
6659
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...
0
7228
marktang
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,...
0
7128
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...
0
7332
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,...
0
7393
jinu1996
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...
1
7058
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...
0
7502
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...
0
4715
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...
0
3206
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...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.