473,495 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

auto update

how can i make it so that when the value of one field is 15 another field in same record automatically enters todays date?
thanks in advance!!
Nov 13 '05 #1
3 2235
Do you want the second field to continue to update every time today's date
changes, as long as the value of the first field is 15?

Or do you want the second field to be updated only when the value of the
first field *changes* to 15?

- Turtle

<jj****@earthlink.net> wrote in message
news:ZC*****************@newsread2.news.pas.earthl ink.net...
how can i make it so that when the value of one field is 15 another field in same record automatically enters todays date? thanks in advance!!

Nov 13 '05 #2
Put the following code in the OnCurrent event of your form:
If Me!FieldA = 15 Then
Me!FieldB = Date()
Else
Me!FieldB = Null
End If

Also put the same code in the AfterUpdate event of FieldA.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
<jj****@earthlink.net> wrote in message
news:ZC*****************@newsread2.news.pas.earthl ink.net...
how can i make it so that when the value of one field is 15 another field in same record automatically enters todays date? thanks in advance!!

Nov 13 '05 #3

<jj****@earthlink.net> wrote in message
news:ZC*****************@newsread2.news.pas.earthl ink.net...
how can i make it so that when the value of one field is 15 another field in same record automatically enters todays date? thanks in advance!!


If you mean, automatically, in a table, without anything else happening, you
can't. Perhaps if you'd tell us a little more detail -- when do you want
this to happen, when you are entering data, or to records that already
exist, etc., we could be of more help.

If you are entering data in a form, in the AfterUpdate event of the Control
where the "15" would appear (call it txtTest) , you might code the following
to set today's date in another control (call it txtNewDate):

If Me!txtTest = 15 Then
Me!txtNewDate = Date()
End If

Larry Linson
Microsoft Access MVP

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2347
by: Rene Aguirre | last post by:
Hello everybody, Recently I made a 'improvement' from an 'old' system we used for i2c bus testing as I had no access to the source code, I started from scratch on Python/wxPython. The idea...
0
3722
by: Jerry Brenner | last post by:
Our users have potentially dirty legacy data that they need to get into our application. We provide a set of staging tables, which map to our source tables, that the users do their ETL into. ...
4
10220
by: Shahar | last post by:
Hi I need to get a field name 'ID'(that is an auto-number field) right after I add a new row to table, it's work like that: myCommand.ExecuteNonQuery(); myCommand.CommandText = "SELECT...
6
5050
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
1
3079
by: ainsley | last post by:
Hi this is going to sound like a very basic question, but I am creating a database in Access which is based on a number of unlimited tables. In my data entry form i have a number of combo boxes...
15
5784
by: Neo | last post by:
Hello All, I found that ASP.net website only accepts code withing site directory. This creates big hurdle in shairng code. How to share code between two websites, like the way share between two...
13
4728
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
0
1124
by: Agnes | last post by:
I try the auto-update program from IIS - http://sourceforge.net/projects/appupdater It works find in window2003 However, when I do the same procedure and setup in window 2000 IIS 5.0 it is fail...
0
1072
by: Agnes | last post by:
my server is WINDOW 2003 , When i process auto update , there is an error" "Application Update Failed" The auto-update of this application failed with the following error message: Download of a...
1
3179
by: jimilives | last post by:
I forgot to turn on auto increment when I reinstalled this database and now I have a bunch of NULL values in my ID field for last few hundred inserts, how can I update this table to replace the NULLS...
0
6991
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
6878
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
7373
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...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
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
4583
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
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
286
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.