473,395 Members | 1,442 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,395 software developers and data experts.

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

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
Nov 13 '05 #1
1 1222
On Fri, 26 Nov 2004 23:09:20 GMT, "Judy" <jr*******@notmyemail.com>
wrote:
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
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jack | last post by:
Hi, I have a asp input form of a financial report. Here most of the fields are text boxes where the user need to input the values corresponding to an item. However, there are few items which are...
14
by: Allen Browne | last post by:
Subform is based on a single-table query that contains a calculated field: Amount: Round(CCur(Nz(*,0)),2) Continuous subform displays this field in a text box named Amount. As user enters new...
1
by: Scott Sabo | last post by:
Hello- I have a query field called EmpHireDate. I want to be able to add a calculated field that will show the employee hire date plus 6 months. I can do this with DateAdd but I also need it...
1
by: Norbert Lieckfeldt | last post by:
MS Access 2002 here. I am just trying to set up a simple database for a friend who's an optician. Basically, all clients with address details, date of last eyetest and a drop-down combo box to...
1
by: tconway | last post by:
I have an Access program that displays Customer data into a form and OrderID data into a subform. The totals in the Subform are based on calculated fields, i.e. the Total Amount field Calculates...
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
5
by: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public...
9
by: Haas C | last post by:
Hi all! Is there anyway I can override a value in a calculated field on a form? For example: I have a form which displays the following fields based on a query: Premium Due field has the...
6
by: John | last post by:
Hi I have a bond fields database winform app. How can I calculate a field form one of the bound fields and show on form? Thanks Regards
0
by: inepu | last post by:
Is there any way to show a field in a pivot table/chart that is calculated based on other fields of the pivot? I have the following table: Date; DescriptionField_1; Slots; EmptySlots I want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.