Adding months to a date of birth

I am working in a form.  I have a field called Visiting Date and a
field called DOB and a field called Classroom.  I am trying to come up
with a formul in 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!

0
debbiep
9/28/2007 1:22:16 AM
access.forms 6864 articles. 2 followers. Follow

3 Replies
389 Views

Similar Articles

[PageSpeed] 36

On Sep 27, 9:22 pm, "debb...@ywcaofjamestown.com"
<debb...@ywcaofjamestown.com> wrote:
> I am working in a form.  I have a field called Visiting Date and a
> field called DOB and a field called Classroom.  I am trying to come up
> with a formul in 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!

Maybe I should be using a bound text for the Visiting date that has
the formula in it.

0
debbiep
9/28/2007 1:23:52 AM
You could add some code to the On_Current event of your form using the 
DateAdd function. Example;

Private Sub Form_Current

If Me![Classroom]  = "Bumble Bears" Then

    Me![Visiting Date] = DateAdd ("m", 15, Me![DOB]) ' add 15 months to DOB

ElseIf Me![Classroom] = "Doodlebugs" Then

   Me![Visiting Date] = DateAdd ("m", 33, Me![DOB])

End If

End Sub

Add however many Else If's you need for the possible values of the Classroom 
control. If you have a lot of possibilities, it might be slightly easier to 
code using a Select Case statement rather than an If...Then statement

You may also want to call this from the After_Update of your Classroom 
control to make sure it stays up to date. Example;

Private Sub Classroom After_Update

Call Form_Current

End Sub

HTH

"debbiep@ywcaofjamestown.com" wrote:

> I am working in a form.  I have a field called Visiting Date and a
> field called DOB and a field called Classroom.  I am trying to come up
> with a formul in 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!
> 
> 
0
Utf
9/28/2007 2:15:00 AM
On Sep 27, 10:15 pm, Beetle <Bee...@discussions.microsoft.com> wrote:
> You could add some code to the On_Current event of your form using the
> DateAdd function. Example;
>
> Private Sub Form_Current
>
> If Me![Classroom]  = "Bumble Bears" Then
>
>     Me![Visiting Date] = DateAdd ("m", 15, Me![DOB]) ' add 15 months to DOB
>
> ElseIf Me![Classroom] = "Doodlebugs" Then
>
>    Me![Visiting Date] = DateAdd ("m", 33, Me![DOB])
>
> End If
>
> End Sub
>
> Add however many Else If's you need for the possible values of the Classroom
> control. If you have a lot of possibilities, it might be slightly easier to
> code using a Select Case statement rather than an If...Then statement
>
> You may also want to call this from the After_Update of your Classroom
> control to make sure it stays up to date. Example;
>
> Private Sub Classroom After_Update
>
> Call Form_Current
>
> End Sub
>
> HTH
>
>
>
> "debb...@ywcaofjamestown.com" wrote:
> > I am working in a form.  I have a field called Visiting Date and a
> > field called DOB and a field called Classroom.  I am trying to come up
> > with a formul in 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!- Hide quoted text -
>
> - Show quoted text -

Actually what I am looking for is a formula that you can add in a
bound text box.  I don't know where to find an On_Current. I do not
see it in the properties of the text box. Thanks n advance.

0
debbiep
9/29/2007 2:09:50 AM
Reply:

Similar Artilces:

Exchange 2003 new domain adding
I have a domain (abc.com). I just purchased another one (xyz.com) and I need to create all the users under this new domain. If I have a user as mark@abc.com, I also need the user to be mark@xyz.com How can I do this? Is it possible that once I have the second domain created with all the users to forward the emails coming to to @abc.com to go to xyz.com? Thanks Manolo after you get your MX record in place, add a new recipient policy... http://support.microsoft.com/kb/268838/en-us -- Susan Conkey [MVP] "Manolo" <Manolo@discussions.microsoft.com> wrote in message news:83EC4...

Enter Sales tansactions with previous dates when connected to netw
Enter Sales tansactions with previous dates when connected to network Hello, How can I enter invoices with previous dates in POS? When I change the date on the terminal, the system still gets the date from the server. And even when I tried offline mode, I could not use the store account tender. Any workaround? Thanks for your suggestions. ...

need excel worksheet help, running total based on date
I am trying to add a series of numbers in different worksheets(same spreadsheet) based upon the date. I don't want the future numbers in the total until the date they are associated with is passed. i.e. in A1 of each worksheet is 200. Each worksheet is titled by date (Mar 5, Mar 19, etc) I want the running total to reflect the amount to the current date. If it's March 18th, the totals would be only thru the worksheet of Mar 5. Any help is appreciated. My solution needs 2 cells, one of which may already be in use: You need a cell on each of the dated sheets that...

Adding products to the temlate for quotes (Print quote for custome
Hi all I try to add more than one product for quote temlate (from Print quote for customer). I want to have a temlate with table of products from quote. But I can choose only one product. Thanks in advance for any help. ...

VB lookup date, then copy and paste
Hi All, I'm looking for some help on creating a macro for the following: Using cell A1 in Workbook 1 (contains a date in format dd/mm/yy), match this date with the same date in Column A in Workbook 2. Column A in Worksheet 2, starts with 31/01/10 in cell A2 and continues to 31/12/20 in cell A3989 (in date order). This end date may increase so I would like the macro to locate the end of column. When a match is found, I would like the macro to copy the content in Workbook 1 Row 1. This row starts at A1 and ends LJ, but again I would like this to be flexible. This data should be pasted ...

Re-enabled AD account can't open it's mailbox
Hi, we just disable the wrong users AD account, so we renabled it and they now cannot access their mailbox: They error on the Exchange 2003 server is: Disabled user /o=Company name/ou=New York/cn=Recipients/cn=Joe.Bloggs does not have a master account SID. Please use Active Directory MMC to set an active account as this user's master account. Try this article http://support.microsoft.com/?kbid=278966 Nebojsa Seslija "SW" <SW@discussions.microsoft.com> wrote in message news:A43EEC0E-D62D-4213-9BC4-503EAA12E40A@microsoft.com... > Hi, we just disable the wrong u...

How to chart monthly sales for successive years
I want to show monthly figures with a line chart, with the second year coming after the first, the third year after the second, etc. I don't want the years to bunch up, ie 3 years-worth of bars for Jan, Feb, etc. I want Jan-Dec 2006, then Jan-Dec 2007, and so forth. Thanks for your help! Create a table with the dates across the top e.g. Jan-07, Feb-07, etc, then have the monthly sales figures below the dates. Select the dates and the sales numbers and click on insert chart. You can see an example of this at www.tejniya.co.uk, click on documents and goto Excel. MVK "wolf...

how do I restrict cell input to dates only?
how do I restrict cell input to dates only? I want a message to be displayed informing the user that only dates are allowed in the cell. Try data|validation. On the settings tab, you can specify that the cell wants dates. James E Slack wrote: > > how do I restrict cell input to dates only? I want a message to be displayed > informing the user that only dates are allowed in the cell. -- Dave Peterson Have a look at Data > Validation Under the "Allow" drop down choose date -- Cutter ------------------------------------------------------------------------ Cutter&...

Excel no autosum after rows added
Using Excel 2000, adding contents of columns using the standard formul (=sum(A1:A45)) etc.. Then paste linking result into anothe sheet/workbook. When adding new rows using a macro the formula does not work and th paste link is kaput.. Help pls -- Message posted from http://www.ExcelForum.com Gmats, If I understand your question correctly, you have a table in Excel of which you have a total (sum) which you want to show up in other worksheets and/or other workbooks. This is done by linking to the cell containing the total. When you insert a row in your table, your formula does not adapt t...

Adding scores and need average
Mr. B set this up for me, but now I need the average of these 15 combo boxes. The formula below adds up the combo boxes for me quite nicely, but now I would like the text box to return the average score of the 15 combo boxes. Thanks, Tom Me.Text144 = Val(Me.Q1) Me.Text144 = Val(Me.Text144) + Val(Me.Q2) Me.Text144 = Val(Me.Text144) + Val(Me.Q3) Me.Text144 = Val(Me.Text144) + Val(Me.Q4) Me.Text144 = Val(Me.Text144) + Val(Me.Q5) Me.Text144 = Val(Me.Text144) + Val(Me.Q6) Me.Text144 = Val(Me.Text144) + Val(Me.Q7) Me.Text144 = Val(Me.Text144) + Val(Me.Q8) Me.Text144 = Val(Me.Text144) + Val(Me.Q...

Adding 2nd @emailaddress.com To Exchange
We are running Exchange 2003 on Native AD. Our company is adding starting a 2nd division which will have it's own email domain. Example. Currently Address user@email1.com Need to add: user@email2.com I know I can add multiple addresses to the Exchange server but now here is the tricky part. If an email comes in to user@email2.com we need him/her to be able to reply back and the email go out with the @email2.com address in the from field/properties. All the test I have ran put the Primary address in the from field. (user@email1.com). Should I look at adding a 2nd email client? T...

Get the ID of a newly added record
I have a table that is being accessed through a class derived from MFC's CRecordSet. The table is actually implemented in Access and it's ID is an auto number field. After doing an AddNew to the table, how can the newly added row's ID be retrieved? In SQL server, I just would have created a stored procedure which would have added the row and returned the ID. obviously, I can't do that in Access. Any ideas? -- Richard Lewis Haggard Hi U�ytkownik "Richard Lewis Haggard" <HaggardAtWorldDotStdDotCom> napisa� w wiadomo�ci news:%23VlM$X1%23EHA.4092@TK2MSF...

adding items to a matrix
When adding existing items to an existing matrix it would be nice to be able to select multiple items to add at one time. We deal with shoes. New colors in exisitng styles are added 4-5 times per year so this requires adding the new items (we usually copy and existing like-item and re-number and re-describe it to reflect the new color), then add those new items to an existing matrix. If we were to add 20 sizes in a shoe in a new color, we would have to create 20 new items, then add them one-by-one to the existing matrix (a total of 40 tasks). If a user were able to multi select ite...

Adding the users name to a new list item
Is there a way to create a list so that when the logged in user creates a new item, it automatically insert's their user name into a column? I'm creating a time entry list, and don't want the users to have to type their name in every time they add a time record. The controller will review this list once a week and create reports based on the user, client, etc. Thanks in advance! Gavin Use the Created by column. -- Daniel A. Galant Imagine what we could be... if we could just imagine. "Gavin Steiner" <gavin@interprom.com> wrote in mes...

Inserting dates
Is this possible? I have two cells which are filled in by choosing from drop-down lists. A1 is January, February etc and B1 is 2006, 2007 etc. Once the user chooses the month & year I would like Excel to automatically fill in some fields further down the sheet - showing the Friday dates in the month/year chosen. EG Choosing March 2007 would give: Friday 2 Friday 9 Friday 16 Friday 23 Friday 30 or August 2006 would give: Friday 4 Friday 11 Friday 18 Friday 25 (and then a blank cell as only 4 Fridays in this month) I can type "Friday" in as text in eg A15-A19 and then use...

date calculation #2
Hi, I want to prepare a Excel spreadsheet which calculates the balance of good in a store as, for eaxmple, follows. A B 1 Brought forward 200 2 manufactured 10 3 Sales 15 4 Balance =B1+B2-B3 I need to know wehther it is possible to change automatically b/f value in cell B1 to the Balance value in cell B4 at the start of everyday. ...

Indicator for tasks extending beyond project completion date
1. Our project has a targetted completion of June 30, 2010. 2. For visual purposes, I created a milestone 'Project complete - target June 30, 2010' which has a deadline of June 30 and a 'Must Finish On' June 30 constraint (knowing that this is an inflexible constraint) so that I can visualize the milestone and deadline on the same June 30 date. 3. How do I have indicators appear against tasks that end beyond the targeted project end date? Thanks Hi, Link the task to the projected end and they will show negative slack (whihc, through a simple formula in a ...

Comparing the same day of the week b/t two months
Using monthly sales data, I am looking for a way to compare mondays to mondays b/t months. For example, first monday of November '03 to first monday of november '04. Can anyone help? You'll get fairly close by adding 364 days (that's 52 weeks * 7), but in some cases that will give you the last Monday in October, so if the 1st date, Nov 3, 2003 is in A1 =A1+364+IF(MONTH(A1+364)<MONTH(A1),7,0) On Mon, 22 Nov 2004 10:57:02 -0800, "rondo" <rondo@discussions.microsoft.com> wrote: >Using monthly sales data, I am looking for a way to compare mondays ...

Adding options to "Show Time As" in Calendar appointment
What is the simplest way to add a few options to this dropdown, like "Sick" etc... I assume this would need replacement of the default form for this globally - how easy is this? Thanks J John wrote: > What is the simplest way to add a few options to this dropdown, like > "Sick" etc... > > I assume this would need replacement of the default form for this globally > - how easy is this? > > Thanks > J I'm not an Outlook forms expert, but I think a custom form with some behind-the-scenes code will do what you need. However, it's g...

Date for latest Update
Hi I want a cell show today() Date when somebody has change something in the document...Also the date will only change when I saving the document.... How I do that ?? //Sokoban ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ThisWorkbook.Names.Add Name:="LastSaved", _ RefersToR1C1:="=""" & _ Format(Now, "mmm-dd-yyyy hh:mm") & "&qu...

extract numbers, convert to date
I imported a comma delimined .txt file into Excel. One column is formated (for example) 070794MEFKMAG. This is a person's birthday (mmddyy) and then parts of their name. I want to extract the birthdate numbers, convert them to a date and subtract that date from todays date. I've been able to extract the numbers [=MID(A12,ROW($1:$9),6)] giving me 070794, but haven't been able to convert them to any date that makes sense. Any suggestions I used the following formula =TODAY() - CONCATENATE(MID(F11,1,2),"/",MID(F11,3,2),"/",MID(F11,5,2)) F11 = 070794 I h...

Switch off date autotext in Outlook 2007
When I type a date in Outlook 2007 a date autotext option appears – how do I switch this feature off in Outlook 2007? ...

Printing Drafts emails Shows a "Sent time and Date"
Hi we have recently upgraded one of our clients to windows 7 / Office 2007. One of the users have reported that when printing draft emails there is a sent time and date that gets added to the top of the email even though the message has not been sent. I have looked through the outlook settings but cannot seem to find a way of turning this off. Any help on this would be appreciated. I have test the same on my own machine which is vista SP2 with office 2007 but get the same issue. I have noticed a date and time being put on draft emails, this started approximately 3 weeks ago. Co...

How do I keep a formula from changing if a row is added or delete.
I have a formulas referencing cells in another worksheet. When rows are added or deleted from the worksheet the formulas are either changed to skip the new row or receive an #REF! error when a row is deleted. Regardless of what happens in the worksheet I want the formulas to remain the same =INDIRECT("Sheet2!A1") HTH. Best wishes Harald "cwolterman" <cwolterman@discussions.microsoft.com> skrev i melding news:241767D4-7DF4-4D63-9F98-D693164D3A02@microsoft.com... > I have a formulas referencing cells in another worksheet. When rows are > added or deleted ...

Extracting Date of Lowest Value from List
Hi - I have a list of daily $Amounts for ea day of the year. ie --Month-- --Date-- --Amount-- In a summary table, I extract the highest AMOUNT for a particular month with {=MAX(IF(Month="Dec",'9am'!Amount))} I extract the DATE of the higest AMOUNT for thyat month, Dec, with {=MAX(((Month)="Dec")*(Amount=MAX(((Month)="Dec")*Amount))*Date)} I can successfully get the highest AMOUNT and DATE for a particular MONTH, but modifying the second formula to get the DATE of the lowest AMOUNT will not work. It fails because it will return the DATE of the lowest A...