Selasa, 27 Mei 2014

Re: [MS_AccessPros] Access 2010 query problem

 

Jessica


Just make that change. Substitute your date field [DOB],[IncDate] for Now()

And you don't have to worry about the formatting of the SQL. Most of us who work with SQL have formatting software. By the way, you should not use apostrophes in field or table names. You should change all of those names now before you run into serious trouble. One example is Subject'sName

To make the changes in tables, queries, forms and reports download V-Tools for your version of Access. it's at http://www.skrol29.com/us/vtools.php It has a tool called Deep Search. It will help you find and replace all occurances of a name.

-Bill



---In MS_Access_Professionals@yahoogroups.com, <hobackjessica@yahoo.com> wrote :

Bill, I have the date set to calculate the age at the time of the incident, not today.  We need to know how many "suspects" were juvenile versus adult at the time of the contact.  Is there a better way to write that?
 
I agree with Liz that the query is scary but, in my defense, it looks a lot better in query design mode rather than SQL. 
 
Jessica 


On Tuesday, May 27, 2014 10:57 AM, "wrmosca@comcast.net [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
Jessica

You might also want to change your Age calculation to something a bit simpler.
DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd")) As Age


-Bill



__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)

.

__,_._,___

Tidak ada komentar:

Posting Komentar