473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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 2228
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
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
0
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...

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.