473,779 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Production Date/Expiry Date (Update)

"Marshall Barton" <ma*********@wo wway.com> wrote in message
news:9a******** *************** *********@4ax.c om...
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, txtProductionDa te)


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.

Nov 12 '05 #1
2 3524
William Bradley wrote:

"Marshall Barton" <ma*********@wo wway.com> wrote in message
news:9a******** *************** *********@4ax.c om...
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, txtProductionDa te)
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.YourExpiryDa teFieldName = DateAdd("d", 183,
Me.YourProducti onDateFieldName )
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.YourProducti onDateFieldName )
as your ControlSource found under the Data tab of the field. Make sure
the name matches the Name field of the field.
Nov 12 '05 #2
"Patrick Finucane" <fi******@minds pring.com> wrote in message
news:3F******** *******@mindspr ing.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.YourExpiryDa teFieldName = DateAdd("d", 183,
Me.YourProducti onDateFieldName )
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.YourProducti onDateFieldName )
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.
Nov 12 '05 #3

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

Similar topics

2
19896
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 = Date().toLocaleString(); Response.Cookies("Test").Expires = Date().toString(); Response.Cookies("Test").Expires = Date().toUTCString();
7
7214
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 time reaches the set expire-time. But if it is an expire time set on my server in California, and the cookie is put on a computer that is running on London Time, and the expire time is set at the server as 20 minutes from now, the London computer...
4
2858
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 of July 31, if I
4
10063
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 "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...
3
9265
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 one particular expiry date could have multiple products I am thinking of two approaches not knowing which one to go for. First design is of one product having many expiry dates (a one to many
12
4702
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 accountExpiryDate.
1
1182
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 date that will make the popup come out 2 months before the expiry date, in simpler words, its like a notification. if lets say today is the date that is exactly two months before the expiry date, when the user logs in, the popup will automatically...
0
2407
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 expiry would be one year from the date of start date. Is there any "ALTER CERTIFICATE" command to update the expiry date without dropping and recreating the keys and certificates. Thanks, MPL
4
1699
peeaurjee
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 years and 1 day back. For Example; Residence Visa Expiry Date = 20/12/2010 Residence Visa Registration Date = 21/12/2007 The above one is the result I want, means expiry date is 3 years and 1 day before the registration date. What I tried is;
0
10305
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10137
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8959
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7483
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4037
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 we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.