473,498 Members | 310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I trap number of rows appended?

4 New Member
I know the system has the number, since it displays it in the text box after the OpenQuery statement runs, but I cannot figure out how to grab it:

This 2 query loop runs fine manually or if I define it to run for a fixed number of iterations. However, I'd really like to just run until no more rows are appended.
Expand|Select|Wrap|Line Numbers
  1. Do
  2.     DoCmd.OpenQuery "TP30d -- Append first refs"
  3.     DoCmd.OpenQuery "TP30e -- Update combinations"
  4. Loop Until APPENDED_ROWS = 0
Thoughts?

Thanks in advance, ML Cottingham, Princeton NJ
Aug 1 '08 #1
1 1764
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi, and welcome to Bytes.

Which query are you referring to when you mention the value displayed in the text box after the OpenQuery statement runs? There are two in your loop, and it would help us to know whether it is one of these you are referring to or what.

If you could expand on what you are doing with the two queries we could probably come up with a solution that would better fit your needs - please advise.

The number of records in a query is an internal property which is not directly accessible. It can be obtained indirectly by using the Dcount function as follows:

Expand|Select|Wrap|Line Numbers
  1. reccount = DCount("*", "[name of your query]")
-Stewart
Aug 2 '08 #2

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

Similar topics

31
9766
by: lawrence | last post by:
I'm not sure how this is normally done, on a large site, perhaps one running Phorum. Occassionally a thread will have hundreds of entries, perhaps a meg or two worth of data. You won't necessarily...
27
2579
by: Mike P | last post by:
I will be passing my function a two dimensional array of varying length. Within that array is one data point, and the number of times it should loop through. So, for example, I might pass this...
4
1797
by: Lyle Fairfield | last post by:
This takes about 2 seconds on my rather obsolete machine: Option Explicit ' Test is a simple JET Table with four fields ' ID -> autonumber primary key ' Field1 -> Integer (maps to VBA long)...
1
1396
by: sam | last post by:
Hello Group, I am working on inserting Rows in the datagrid as follows: Private Function addHeaderLines(ByVal ds As DataSet) As DataSet Dim dr, drBlank As DataRow Dim count, repeatCount,...
6
3798
by: cjobes | last post by:
Hi all, I have a date field in a temp table as part of a DataSet. In some records the value is DBNull. how can I trap the error with if dtTemp("When") = ??? Then..... Thanks, Claus
3
8514
by: Kriston-Vizi Janos | last post by:
Dear Mr. Kern, and Members, Thank you very much for the fast answer, my question became over-simplified. My source code is appended below. It uses two text files (L.txt and GC.txt) as input...
10
2321
by: pemo | last post by:
As far as I understand it, a trap representation means something like - an uninitialised automatic variable might /implicitly/ hold a bit-pattern that, if read, *might* cause a 'trap' (I'm not...
3
2162
by: Wayne L | last post by:
Ok now everyone has mentioned not to use auto number if it means anything to the user. My application uses the auto number for exporting only. I append the mastertbl column with my starting number of...
4
4326
by: =?Utf-8?B?UmljaA==?= | last post by:
I have to read data from an Excel Sheet. Using Microsoft Office Interop and Automation I create an Excel object Dim xl As New Excel.Application, wkbk As Excel.Workbook, rng as Excel.Range I...
0
7124
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
6998
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
7163
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
7200
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...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4904
isladogs
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...
0
3090
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
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.