I can provide some ideas, but I don't know your data well enough to write it for you. First, you need to filter by course as well as by the B. =DCount("*","Table Name", "[ACode] = 'B' AND CourseCode = '" & Me.Course & "'") To do the math you have to know how many total seats are available for the course. -- Dave Hargis, Microsoft Access MVP "Chester1" wrote: Klatuu
The last argument of the DCount function v---------------v =DCount("*","Table Name", "[ACode] = 'B'") is how you do your filtering. It is just like writing a WHERE clause for a query without the word WHERE. I was using your comments to build this. In this example, it should count all records where the field Acode is equal to B. -- Dave Hargis
Sorry this may seem a bit thick but where do I type this code -- Regards Clair "Klatuu" wrote: =DCount("*","Table Name", "[ACode] = 'B'") -- Dave Hargis, Microsoft Access MVP "Chester1" wrote: Please can anyone help? I have a table that hold Course Attendees the ACode filed in the table can be either A - Attended B - Booked on Course
Dear JOPO Thanks for your reply. I am a bit of a novice at this but I am not trying to pick a course from a list I just want to add new courses and to avoid adding the same course on the same day at the same time based on the date and time. PS I think I can use your advice somewher else on the database. -- Regards Clair "Jeff Boyce" wrote: Another way to approach this,
On Tue, 11 Jul 2006 08:01:03 -0700, Chester1 wrote: Hi I have a form in which I have a list of 14 different courses. I would like each course to show as a different colour. I have tried using Conditional Formatting but you can only have up to a maimum of 3 conditions is there any other way to do this?? See what Stephen Lebans has: http://www.lebans.com -- Fred Please