Auto date and day, month, year totals on form

G

Guest

I have a field named date in my database. I'm trying to do the following on
the form.

A) On the form I want the date to be entered automatically based on today's
date. I tried changing the date properties to common expression date(), but
it gave me an error.
B) Also, on the form I want a non-editable area that will total the number
of entries for the current date, another area for total current month, and
another area for total for current year. So it will calculate all entries
for current day. Based on the current day it will calculate for the current
month , and last there will be a calculation for current year.

If this is possible can you please help
 
G

Guest

Hi LU,
I recommend for multiple questions that you have a single post for each
question so that you can discuss each individually. For those responding it
makes it clear whether each question has been resolved...

Qu A) It is likely that your field named [date] is causing an ambiguous
reference problem. That is [date] is also a built-in function. My
recommedation is for you to amend the field name to avoid any possible
ambiguity. For example [tableNameDate] or [recordEntryDate].

Qu B) I suggest that you use online help to look up domain functions such as
DCOUNT(). Have this function as the control source for a textbox. Use the
following as an example:

=dcount([recordEntryDate],"formDataSourceName
table/query",[recordEntryDate]=" & date())

Alternatively use online help for information about recordsets so that you
can use the result of a totals query.

Use online help to lookup date functions.
 

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