By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,483 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,483 IT Pros & Developers. It's quick & easy.

How do I trap number of rows appended?

P: 4
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
Share this Question
Share on Google+
1 Reply


Expert Mod 2.5K+
P: 2,545
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

Post your reply

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