A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need Help with a formula in a query!



 
 
Thread Tools Display Modes
  #1  
Old September 29th, 2007, 08:37 PM posted to microsoft.public.access.forms
[email protected][_2_]
external usenet poster
 
Posts: 42
Default Need Help with a formula in a query!

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))

  #2  
Old September 29th, 2007, 08:55 PM posted to microsoft.public.access.forms
[email protected][_2_]
external usenet poster
 
Posts: 42
Default Need Help with a formula in a query!

On Sep 29, 3:37 pm, "
wrote:
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))


I got it, thanks anyway. You guys are great though. I have learned so
much just by asking questions. I wish I knew more.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.