Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counting records in a form

Status
Not open for further replies.

vols77

Technical User
Joined
Feb 17, 2007
Messages
29
Location
US
in a form is ther away to have access number the detail lines .

I.E. the records contain names so on the form if possible I would like to see

1 John
2 Bill
3 Jack
and so on...

the primary key in the table with the names is a autonumber but the sequence is not in order since I have added/deleted names.

I remember that in a report there is a way to use "count" to count the lines, but not sure how to do this in a form (or if possible). Keeping it simple is a must especially since I will not be maintaining the file, only setting up so I would like to avoid setting up tables or other queries...

Thank you in advance for any and all help.

V.
 
Two possible theads:
Count records on subform
thread702-773527
Displaying Record Number on Access Continuous Form
thread702-784137

There is at least on FAQ, as far as I recall.

 
The first thread did it thanks!
 
new one related... do you know (I searched by using msg box yes/no) of an example of a message box with a yes/no option and the select case.

I am trying to display"

"IF already done on Sunday click "yes" and open the form "employees" otherwise click "No" to open the report "time
 
How about:

Code:
If MsgBox("IF already done on Sunday click 'yes'" & vbcrlf _
& "and open the form 'employees' otherwise click 'No'" & vbcrlf _
& "to open  the report 'time'",vbYesNo)=vbYes Then
   DoCmd.OpenForm "Employees"
Else
   DoCmd.OpenReport "Time"
End if

 
Worked great! really I can not thank you enough... I am trying to make this database as user friendly and "simple" as possible, which means alot of yes/no to guide the user.

thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top