473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Make Looping Counter in Query with intMaxCount Parameter

qry_SpotSetter
RecordNumber RecordId LoopingCounter
2343 - - - - - - - - - - 1 - - - - - - - - - - 1
2346 - - - - - - - - - - 2 - - - - - - - - - - 2
2349 - - - - - - - - - - 3 - - - - - - - - - - 3
2350 - - - - - - - - - - 4 - - - - - - - - - - 4
2351 - - - - - - - - - - 5 - - - - - - - - - - 1
2353 - - - - - - - - - - 6 - - - - - - - - - - 2
2354 - - - - - - - - - - 7 - - - - - - - - - - 3
2355 - - - - - - - - - - 8 - - - - - - - - - - 4
2356 - - - - - - - - - - 9 - - - - - - - - - - 1
2357 - - - - - - - - - - 10 - - - - - - - - - -2
2358 - - - - - - - - - - 11 - - - - - - - - - -3
2359 - - - - - - - - - - 12 - - - - - - - - - -4

I used Serialize to make RecordId in this Query.. Also could use AutoNumber Field in original table. Either would Work for my ID.

What I need is a

fncLoopingCounter(intMaximumCount as Integer,?,?)
'fncLoopingCounter(4,?,?)

Just started learning basic VB

I can make a counting field that starts over based on category (kind of like a category summary with counter), but this "fncLoopingCounter" just needs to start with the first record (determined by how I have the Query Sorted) and go down to the next intMaximumCount... In this case my "intMaximumCount" Parameter is 4
Sep 20 '06 #1
1 2485
PEB
1,418 Expert 1GB
Hi,

See http://www.thescripts.com/forum/thread534905.html

There is a functions that you can use in combination with IIF() in your queries!


Then Save your results in a temporary table before use them!

:)

Have a nice day!

:)
Sep 21 '06 #2

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

Similar topics

1
by: Ken Fine | last post by:
I have a menu system that has nodes that can be opened or closed. In an effort to make my code more manageable, I programmed a little widget tonight that keeps track of the open/active item and...
6
by: PG | last post by:
When deleting a row from the database, that id is now missing. So what I'm trying to do is update in a loop (maybe an sql loop if there is one) of all of the id numbers - sort of like renaming...
4
by: David | last post by:
Hello. I am looking for advice on what is "best practice" regarding looping through a form to check its checkboxes and associated data fields. Here is what I am trying to do (Here is the page...
1
by: Beau | last post by:
Hi all, thanks in advance. Ok, heres the story. What is happening...... -------------------------------- I've got an ASP page that loops. It loops in order to get data in different,...
7
by: Ken | last post by:
Hi All - I have a filtered GridView. This GridView has a check box in the first column. This check box is used to identify specific rows for delete operations. On the button click event I...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: Delores | last post by:
I have been running make-table queries to create 10 tables (one for each unit) that are exported to Excel spreadsheets. Because of my limited knowledge with code, I've created 10 separate queries...
4
by: Tigger2000 | last post by:
I keep getting an error when trying to compile this for Java prog class, below is the instructions for the assignment and my code. Loop Assignment Write, compile, and run a Java program that...
3
by: chiku1523 | last post by:
Hi, Please find the following code. In function setAnswers, I am looping with each question. I have inner loop, which is looping for each answers of the questions. If any of the answer for question...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.