Date field will not populate correctly

H

heavenlyhost1

I have created an ACCESS form. I need the form to automatically populate a
date field when a logic field is checked. I cannot get this to work. When
the field "HCMS Forwarded" is checked by the user, the date field "FOLLOW_UP"
should be populated with the current date plus 10 days. In the Default Value
of FOLLOW_UP I have: IIf([HCMS Forwarded}=False,Date()+10,""). This not
working. I either get nothing or the date 12/29/1898! Please help.
 
H

heavenlyhost1

I'm not familiar with VBS, so I guessed at where I should put it and this is
what I got:
Private Sub HCMS_Forwarded_AfterUpdate()
If [HCMS Forwarded] Then
Me.[FOLLOW_UP] = Date + 10
Else
Me.[FOLLOW_UP] = Null
End If
End Sub
It gives an error at the "Me.(FOLLOW_UP] = Null. I thought it was because
the underscore was missing, so I added it and saved, but I still do not get a
date. Where did I go wrong?
ruralguy via AccessMonster.com said:
In the AfterUpdate event of the [HCMS Forwarded] control put the code:
If [HCMS Forwarded] Then
Me.[FOLLOW UP] = Date + 10
Else
Me.[FOLLOW UP] = Null
End If
I have created an ACCESS form. I need the form to automatically populate a
date field when a logic field is checked. I cannot get this to work. When
the field "HCMS Forwarded" is checked by the user, the date field "FOLLOW_UP"
should be populated with the current date plus 10 days. In the Default Value
of FOLLOW_UP I have: IIf([HCMS Forwarded}=False,Date()+10,""). This not
working. I either get nothing or the date 12/29/1898! Please help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
H

heavenlyhost1

After I sent a reply that said it didn't work, it worked! Now my issue is
that it will not populate the date on prior records. You see, the HCMS
Forwarded will only be entered after a few days, so it is imperative that we
be able to go back and enter it later. How do I get it to allow updates on a
saved record?

ruralguy via AccessMonster.com said:
In the AfterUpdate event of the [HCMS Forwarded] control put the code:
If [HCMS Forwarded] Then
Me.[FOLLOW UP] = Date + 10
Else
Me.[FOLLOW UP] = Null
End If
I have created an ACCESS form. I need the form to automatically populate a
date field when a logic field is checked. I cannot get this to work. When
the field "HCMS Forwarded" is checked by the user, the date field "FOLLOW_UP"
should be populated with the current date plus 10 days. In the Default Value
of FOLLOW_UP I have: IIf([HCMS Forwarded}=False,Date()+10,""). This not
working. I either get nothing or the date 12/29/1898! Please help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
H

heavenlyhost1

I figured it out. I had, somewhere along the line, entered a filter. I
turned the filter off and the form is working beautifully. Thank you
ruralguy. You were a great help

hh

heavenlyhost1 said:
After I sent a reply that said it didn't work, it worked! Now my issue is
that it will not populate the date on prior records. You see, the HCMS
Forwarded will only be entered after a few days, so it is imperative that we
be able to go back and enter it later. How do I get it to allow updates on a
saved record?

ruralguy via AccessMonster.com said:
In the AfterUpdate event of the [HCMS Forwarded] control put the code:
If [HCMS Forwarded] Then
Me.[FOLLOW UP] = Date + 10
Else
Me.[FOLLOW UP] = Null
End If
I have created an ACCESS form. I need the form to automatically populate a
date field when a logic field is checked. I cannot get this to work. When
the field "HCMS Forwarded" is checked by the user, the date field "FOLLOW_UP"
should be populated with the current date plus 10 days. In the Default Value
of FOLLOW_UP I have: IIf([HCMS Forwarded}=False,Date()+10,""). This not
working. I either get nothing or the date 12/29/1898! Please help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top