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

Counting a date field in a table

Gee
Hi Folks,
I have a small database that contains test dates. We can only sit 9
people per test. I need to count the dates that are the same and NOT go
over 9.

I read MSAcess help on the DCount function and on the Count function,
but I am still lost. It seems DCount will only work with VBA, and Count
is supposed to work in a macro.

I don't know VBA, so I can't use it for this purpose. As always, this
needs to me done yesterday.

I need a way for a message box to pop up when the data entry person
enters a date that is already in the table 9 times, that way they will
pick another test date.

I can have the data entry person enter a date in a query and see how
many records there are with that date, but the problem is that there
are 5 or 6 data entry people that might use this database and the boss
doesn't have time to "train" all of them.

Any help will be greatly appreciated.

Thanks for your time and consideration!

BabaRomBios :-)

Nov 13 '05 #1
1 1561
Gee wrote:
Hi Folks,
I have a small database that contains test dates. We can only sit 9
people per test. I need to count the dates that are the same and NOT
go over 9.

I read MSAcess help on the DCount function and on the Count function,
but I am still lost. It seems DCount will only work with VBA, and
Count is supposed to work in a macro.

I don't know VBA, so I can't use it for this purpose. As always, this
needs to me done yesterday.

I need a way for a message box to pop up when the data entry person
enters a date that is already in the table 9 times, that way they will
pick another test date.

I can have the data entry person enter a date in a query and see how
many records there are with that date, but the problem is that there
are 5 or 6 data entry people that might use this database and the boss
doesn't have time to "train" all of them.

Any help will be greatly appreciated.

Thanks for your time and consideration!

BabaRomBios :-)


Find the BeforeUpdate event in the property sheet for the Control on the form
where the date will be entered. From the drop-list of choices enter "[Event
Procedure]" and then press the build button [...] to the right of the event
property. This will take you to the VBA window where you need to enter your
code...

If DCount("*","TableName", "DateFieldName = #" & Me.DateControlName & "#")=9
Then
MsgBox "Date Filled. Choose Another"
Cancel = True
End If

This assumes that all date entries have no time component (actually midnight) in
them.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

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

Similar topics

5
by: Adam i Agnieszka Gasiorowski FNORD | last post by:
I need help width formulating the most effective (in terms of processing time) SQL query to count all the "new" documents in the repository, where "new" is defined as "from 00:00:01 up to...
6
by: Ike | last post by:
How can I make a query such that in the "WHERE" part of my clause, I want to put something to the effect that, say, X days have elapsed since a given date. For example, suppose in my table, I have...
2
by: BlackFireNova | last post by:
I have an Access 2003 mdb which contains software records. I need to sort on a particular type of software, and then identify and count how many copies there are per each group of that type...
10
by: Kenneth | last post by:
I have a Query that consist of a lot of different sales data, and one of the colums are different date. The date goes from 1jan2003 til 31jan2003. in this Query I only want the salesdata for...
4
by: Alicia | last post by:
I am having a problem grouping by week. I am looking for the simpliest way of doing it in Microsoft Access. I have tried to use a pre-loaded calender, access did not like it at all. If there is...
3
by: Megan | last post by:
hi everybody- i'm having a counting problem i hope you guys and gals could give me some help with. i have a query that retrieves a bevy of information from several different tables. first let...
18
by: ChadDiesel | last post by:
I appreciate the help on this group. I know I've posted a lot here the last couple of weeks, but I was thrown into a database project at my work with very little Access experience. No other...
7
by: sathyashrayan | last post by:
Group, Following function will check weather a bit is set in the given variouble x. int bit_count(long x) { int n = 0; /* ** The loop will execute once for each bit of x set,
21
by: jennwilson | last post by:
Ok - So, I am back. I would like to count the number of times a specific record appears in a field from one table in my query and then use that value in the same query to calculate an average....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.