--- In AccessDevelopers@yahoogroups.com, Lonnie Johnson 
<[EMAIL PROTECTED]> wrote:
>
> There are many ways to "skin a cat" in Access. One way would be to 
define your criteria in vba when you open the report like so...
>    
>   DoCmd.OpenReport "MyReport", acViewPreview, , "Age BETWEEN 16AND 
25"

Thanks Lonnie for replying,
after reading here for a loong time i finally figure it out how to 
restrict the report with ages 16-25. I made a query with that string

Age: DateDiff("yyyy",Lifetimetbl.Dob1,Date())+(Date()<DateSerial(Year
(Date()),Month(Lifetimetbl.Dob1),Day(Lifetimetbl.Dob1))) 

with a criteria >=16 And <=25 The string works fine with Dob1,But 
when I try to add Dob2, Dob3 etc, it says 

duplicate output alias age?

How do I fix that? I'm basically trying to run the query for child1 
through child5.
any ideas??

oh and i was trying your vba command by making a module and saving 
the command in that but i wasnt sure on how to call that module which 
shuold be related to that report.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to