![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Paolo: You could use a query, but there is an easier way. Use this function: DCount(expr, domain, [criteria]) In this case expr is any field in the table. domain is the name of the table. criteria looks like: "dob = " & me.dob You will get the count without wrting a query. There are a whole set fo function called "Domain Aggregate Functions" that are very useful and often neglected. Look them up . Good Luck Ira Solomon On 31 Jul 2003 03:23:00 -0700, jprma (AT) tin (DOT) it (Paolo) wrote: Frinds, I have a table named CLIENTS with a field named DOB in which I have stored my client's date of birth. I would now like to create a form (named frmquery) on which add two tex boxes to run a query so that I can know how many clients I have with a specific age. Let's say that the first text box (I'll name it simply txtsearch) will be used to supply criteria to the query. The second, named txtresult, should return the number of clients with the age indicated in txtsearch. The field on my table has a mm/dd/yyyy format with date property. My problem is that I do knot know how to write the query criteria or other. I know how to write in the query: Like [forms]![frmquery]![txtsearch] do make the text box ready for the query but do not know how do actually create date of birth queries. Thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |