467,151 Members | 950 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

Date field

I have been gone from working on databases for about 10 years, and have forgotten a lot of what used to come naturally to me.

I have to learn some of the simple things again-- and my usual sources on the internet are no longer available

I have a simple form that has date fields. If the "completed" date field has an entry made into it---"status" has to change to "C"

if the "completed" date field is null, then "status will be "A"

but If "cancelled" box is checked, then "status" will be "CNC"

Thank you for being patient with me

Joy
Nov 5 '06 #1
  • viewed: 1263
Share:
2 Replies
Sorry

I didn't include the simple code I put in

Private Sub Form_Current()
If IsNull(Me.Completed) Then
Status = "A"
Else
Status = "C"
End If
End Sub

This changes the "Status" to "C" when the
"Completed" date field has an entry
and will be "A" as long as the completed date field is null

But I need to change the field to "CNC" when the project has been cancelled
Nov 5 '06 #2
OK
maybe I answered my own question

Private Sub Form_Current()
If (Me.Cancelled) = True Then
Status = "CNC"
ElseIf IsNull(Me.Completed) Then
Status = "A"
Else
Status = "C"
End If
End Sub


I have been away from DBs for a long time. I knew it was just simple code, but I couldn't remember it
Nov 5 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by vnl | last post: by
10 posts views Thread by Kenneth | last post: by
1 post views Thread by EV | last post: by
1 post views Thread by Monica Roman | last post: by
1 post views Thread by Graham Feeley | last post: by
7 posts views Thread by sheri@mbproducts.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.