Calculated Field To Show 1/3, 2/3 And 3/3

J

Judy

I have the following table in part ---
TblClassDate
ClassDateID
CourseID
ClassDate

Classes for courses are held on multiple days. The data for a course in the
table might look like:
ClassDateID CourseID ClassDate
1 45 9/3/04
2 45 9/15/04
3 45 9/30/04

How can I construct a calculated field in a query to give the class number
for each class such as:

ClassDateID CourseID ClassDate ClassNum
1 45 9/3/04 1/3
2 45 9/15/04 2/3
3 45 9/30/04 3/3

Thanks for all help!

Judy
 
J

John Vinson

How can I construct a calculated field in a query to give the class number
for each class such as:

ClassDateID CourseID ClassDate ClassNum
1 45 9/3/04 1/3
2 45 9/15/04 2/3
3 45 9/30/04 3/3

Try:

ClassNum: DCount("*", "Classes", "CourseID = " & [CourseID] & " AND
ClassDate <= " & [ClassDate]) & "/" & DCount("*", "Classes",
"CourseID = " & [CourseID])


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top