Generate serial number dynamically in a query

sunilvedula

Sunil
Local time
Today, 16:29
Joined
Jan 18, 2007
Messages
138
hi all,

i have a query which give me a result of few records. For eg it give me a list of 10 records. I want also to generate a serial number in the output of query to list the records from 1-10. i cannot create a sno in the table. cany anyone guide me
 
Hi Uncle Gizmo,

The examples are fabulous but the problem that i notice is my table contains the same data which is repeated multiple times and hence it is not working for me. Can u help me
 
Hi All
Finally i was able to generate the sequence numbers. Thanks a lot to all these forums.
 
Hi All
Finally i was able to generate the sequence numbers. Thanks a lot to all these forums.
It would be very helpful if you could post your solution for the benefit of other forum users
 
sure sir,
Just that i though the solution was a simple one and hence did not post it.
what i have done is i have created another query which takes input from the questions query (output one) and used an expression like :
Expr1: DCount("Questions","qryQuestions","Questions<='" & [Questions] & "'")
the entire code of the new query used to populate the seq number is below:

Code:
SELECT DCount("Questions","qryQuestions","Questions<='" & [Questions] & "'") AS Expr1, qryQuestions.Questions
FROM qryQuestions
GROUP BY qryQuestions.Questions;

thanq everyone
 

Users who are viewing this thread

Back
Top Bottom