"Marshall Barton" <ma*********@wowway.com> wrote in message
news:9a********************************@4ax.com... William Bradley wrote:
I have two cells on a form. One of them is the "Production Date" and the other is the "Expiry Date". The "Expiry Date" is 183 days after the "Production Date."
On an Excel spreadsheet, the "Expiry Date" is automatically entered, when the "Production Date" is entered. To do this the "Expiry Date" cell carries the following formula: "=A15+183".
I would like to be able to do the same on an Access Form, with the results written to the underlying table.
I think what you're asking for can be done by using a line of code in the Production Date text box's AfterUpdate event procedure:
txtExpiryDate = DateAdd("d", 183, txtProductionDate)
Thank you for the above Marsh. I already have a line of code in the "After
Update" of the "ProductionDate" field. Is it possible to add yours, above,
as well? If so how? I tried it and it didn't work, probably due to my
missing something out.
Is there a way of accomplishing the same result using the "Expiry Date"
field.
Thank you,
Bill. 2 3489
William Bradley wrote: "Marshall Barton" <ma*********@wowway.com> wrote in message news:9a********************************@4ax.com... William Bradley wrote:
I have two cells on a form. One of them is the "Production Date" and the other is the "Expiry Date". The "Expiry Date" is 183 days after the "Production Date."
On an Excel spreadsheet, the "Expiry Date" is automatically entered, when the "Production Date" is entered. To do this the "Expiry Date" cell carries the following formula: "=A15+183".
I would like to be able to do the same on an Access Form, with the results written to the underlying table.
I think what you're asking for can be done by using a line of code in the Production Date text box's AfterUpdate event procedure:
txtExpiryDate = DateAdd("d", 183, txtProductionDate) Thank you for the above Marsh. I already have a line of code in the "After Update" of the "ProductionDate" field. Is it possible to add yours, above, as well?
Yes. You can add many lines of code to an event.
If so how? I tried it and it didn't work, probably due to my missing something out.
I would dblclick on the field for ExpiryDate and pull up the property
sheet, then click the Other tab. What is the Name field value? Change
txtExpiryDate to that name or do something like
Me.YourExpiryDateFieldName = DateAdd("d", 183,
Me.YourProductionDateFieldName)
Is there a way of accomplishing the same result using the "Expiry Date" field.
Yes. Since the date is calculated, remove the code in the AfterUpdate
event. Then enter
=DateAdd("d", 183, Me.YourProductionDateFieldName)
as your ControlSource found under the Data tab of the field. Make sure
the name matches the Name field of the field.
"Patrick Finucane" <fi******@mindspring.com> wrote in message
news:3F***************@mindspring.com... I would dblclick on the field for ExpiryDate and pull up the property sheet, then click the Other tab. What is the Name field value? Change txtExpiryDate to that name or do something like Me.YourExpiryDateFieldName = DateAdd("d", 183, Me.YourProductionDateFieldName)
Is there a way of accomplishing the same result using the "Expiry Date" field.
Yes. Since the date is calculated, remove the code in the AfterUpdate event. Then enter =DateAdd("d", 183, Me.YourProductionDateFieldName) as your ControlSource found under the Data tab of the field. Make sure the name matches the Name field of the field.
Thank you Patrick, the first solution above worked fine.
Bill. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Vince C. |
last post by:
Hi all.
I'm trying to set a cookie expiry date but my script is JS (JavaScript). I've
tried
Response.Cookies("Test").Expires = Date();
Response.Cookies("Test").Expires =...
|
by: What-a-Tool |
last post by:
How does the expire date work setting it server side with asp.
I know with javascript setting it client side it will be set to the clients
local time, and therefore expire when the clients local...
|
by: ianv2 |
last post by:
Hi
Is the following possible using Javascript ?
I would like a page to redirect to another page if the page expiry has
passed.
E.G.
If my questionnaireform.html page had an expiry date...
|
by: William Bradley |
last post by:
I have two cells on a form. One of them is the "Production Date" and the
other is the "Expiry Date". The "Expiry Date" is 183 days after the
"Production Date."
On an Excel spreadsheet, the...
|
by: hasanainf |
last post by:
Hi all,
What will be the best database design for an inventory control that
uses expiry date for its products.
Over a period of time, a particular product will have many expiry date
and that...
|
by: shane.taylor81 |
last post by:
Consider the following table
Customer
custId char(10)
accountExpiryDate datetime
accountStatus bit
Now, I want to update the accountStatus to False as soon as the
current date becomes...
|
by: janna48 |
last post by:
Hey guys,
Ive posted a question about making a popup that will come out two months before the expiry date. acoder has helped me with the popup thingy, but im facing this problem of calculating the...
|
by: mplpost |
last post by:
We have created a Certificate for the purpose of symmetric encryption.
We did not mention the expiry date explicitly, only later we found out
that, if expiry date not mentioned then the default...
|
by: peeaurjee |
last post by:
Hello,
I have a query containing Serial, Name, Residence Visa Expiry Date in MS Access 2003. I need to put Residence Visa Registration Date in other field and that would be in reverse I mean 3...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |