Counting the Records in Form
Hello,
I have a form that contains some data and I would like to count them in a new Item text box ... I don't want to use the Item Text's property ... I want to use the SQL statement code to count the records in a form ... I named the Item Text as Count_Records ...
So, Can I have your nice help in this (^_^)
counting the records in forms
hellow meLady,
Your question is slightly confusing... you haven't mentioned how the data in your forms comes eg. does it comes form the database or the user enters the data or you want to count the word/character within your form's textbox entered by user(s) or likewise....
Well, if your records come from database than you can simply use the COUNT clause to count the records i.e
SELECT COUNT(*) FROM TBL
WHERE 1 = 1
AND <COND1> = <COND2>
and so on.... or you can simply initialize one variable and increment it within the loop and in next text box you can print the value of that variable.
Thanks,
spoons