473,499 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date field

3 New Member
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
2 1417
JKTLK
3 New Member
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
JKTLK
3 New Member
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

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

Similar topics

16
2185
by: jason | last post by:
I'm tearing out my hair here: ACCESS 2000: When I attempt to overwrite a date in my date field with a new user selected valid date eg: 05/23/99 my date field changes to the TIME I updated the...
7
682707
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time =...
3
12950
by: BlackFireNova | last post by:
This concerns an Access 2002 (XP) database. There are two fields, "Notes" (Memo Field) and "Notes Update" on a form (among others) which I am concerned with here. Problem: I need to be able...
10
2953
by: Kenneth | last post by:
I have a Query that consist of a lot of different sales data, and one of the colums are different date. The date goes from 1jan2003 til 31jan2003. in this Query I only want the salesdata for...
3
2560
by: captain | last post by:
Below is the sql for data with same date need to extract + or - 5 days data of same date also. How to also get data of + and - days related to same date. SELECT IM.Area, IM.Location,...
1
1644
by: EV | last post by:
We have a personnel database that we want to set up...For time off we will have a start date field and an end date field as well as a field for the number of hours. We need to determine how many...
1
2028
by: Monica Roman | last post by:
Hello, help please. I have a little macro that copies the date from a date/time field to a memo field, BUT instead of going to the memo field it finds the first date/time field and tries to copy...
1
1832
by: Graham Feeley | last post by:
I have a date field named rcdate it is a general date eg: 12/08/2006 3:30:00 PM 12/08/2006 3:00:00 PM I used to update another empty field named rdate with the with using in a update query "...
6
12520
by: Luvin lunch | last post by:
Hi, I'm new to access and am very wary of dates as I have limited experience in their manipulation and I know if they're not done properly things can turn ugly quickly. I would like to use a...
7
10163
by: sheri | last post by:
I have a field called date, the date is in the field like this 70925 (which means Sept. 25, 2007). I have another field called day, it is a text field. How do I write a query to populate the day...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.