Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / September 2007

Tip: Looking for answers? Try searching our database.

Need Help with a formula in a query!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
debbiep@ywcaofjamestown.com - 29 Sep 2007 20:37 GMT
I am working in a query.  I have a field called DOB and a field called
Classroom.  I am trying to come
> up
> with a formula that will calculate the Visiting date that I put in my form.  The formula for the form does not work in the query.  The Visiting date that will show if a Child's
> Classroom = Bumble Bears, the visiting date needs to tell me the date
> on his 15 months, when the Child's Classroom = Doodlebugs, the
> visiting date needs to tell me the date on his 33 months.
>
> Can anyone help me. I have such a hard time with IF statements.  Your
> help is
> greatly appreciated.
> Thank you!

This is the formula in the form bound text, which is perfect for that.

=Switch(Classroom = "Bumble Bears", DateAdd("m", 15, DOB), Classroom
=
"Doodlebugs", DateAdd("m", 33, DOB))
debbiep@ywcaofjamestown.com - 29 Sep 2007 20:55 GMT
On Sep 29, 3:37 pm, "debb...@ywcaofjamestown.com"
<debb...@ywcaofjamestown.com> wrote:
> I am working in a query.  I have a field called DOB and a field called
> Classroom.  I am trying to come
[quoted text clipped - 15 lines]
> =
> "Doodlebugs", DateAdd("m", 33, DOB))

I got it, thanks anyway. You guys are great though. I have learned so
much just by asking questions.  I wish I knew more.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.