Please help... DCount and User specified data.

T

Trial & Error

I have a form that accepts registrations, involving contact info, date and
time.
Beside those fields is a subform that is set to display any "limits" that
have been set on registrations for that day. This way the user can select
alternate times if he / she sees there will be a conflict.

In order for someone to realize if a limit has been met, I need the current
# of registrations that have already been made to be displayed on the form.
However, I need this total to be specific to the date that the user has
entered on the form.

I have tried using DCount... and maybe I am using it incorrectly.. but it
usually comes back telling me the expression I have created is too complex.

I would like to be able to display a list that would have the times that
registrations have been made, along with the number of entries at that time.
This list would populate once the user had entered the "date" on the form.

ie. dcount would use the date being entered to count the # of entries made
at each unique time slot on that date.

Sorry for such a confusing post... I hope the general idea has gotten through.

Thanks in advance for any help on this!!!

Cheers
 
J

John Vinson

I have a form that accepts registrations, involving contact info, date and
time.
Beside those fields is a subform that is set to display any "limits" that
have been set on registrations for that day. This way the user can select
alternate times if he / she sees there will be a conflict.

In order for someone to realize if a limit has been met, I need the current
# of registrations that have already been made to be displayed on the form.
However, I need this total to be specific to the date that the user has
entered on the form.

I have tried using DCount... and maybe I am using it incorrectly.. but it
usually comes back telling me the expression I have created is too complex.

I would like to be able to display a list that would have the times that
registrations have been made, along with the number of entries at that time.
This list would populate once the user had entered the "date" on the form.

ie. dcount would use the date being entered to count the # of entries made
at each unique time slot on that date.

Sorry for such a confusing post... I hope the general idea has gotten through.

It is a confusing post. It's confusing because we do not know how your
tables are structured, what might the names and datatypes of the
fields be, how the date or the limits are determined, or what DCount()
expression you might have tried.

Remember - you can see your database; we cannot. We can only see what
you tell us.

That said... a DCount expression on the form with an expression like

=DCount("*", "[SomeUnknownTableName]", "[Datefield] = #" & [txtDate] &
"#")

will count the records in SomeUnknownTableName where that table's
Datefield value is equal to the date in the textbox named txtDate. The
# characters are date/time delimiters.


John W. Vinson[MVP]
 
Top