A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I allow users to change a calculated date in a form field?



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2006, 02:39 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form field?

How do I allow users to change a calculated date in a form field?
  #2  
Old January 4th, 2006, 02:43 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form field?

Make the calculated date the default for that field. Then your users could
change it if needed.


--
Rick B



"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?



  #3  
Old January 4th, 2006, 02:52 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form field?

If you need to allow users to change the value in a field, you need to store
it.

Use the AfterUpdate event of the control(s) its value is based on to assign
the inital value. The users can then change it as needed.

For example, if your invoice is normally due 14 days from the InvoiceDate,
but a user can change to to 30 days or something else, you would use this in
the AfterUpdate event procedure of InvoiceDate:
Private Sub InvoiceDate_AfterUpdate()
Me.DueDate = DateAdd("d", 14, Me.InvoiceDate)
End Sub

More info in article:
Calculated Fields
at:
http://allenbrowne.com/casu-14.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?



  #4  
Old January 4th, 2006, 03:02 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

Hi Rick,

Thanks for the info, but now when I make the calculated date the default for
that field, it does not calculate the date correctly...odd.

Here is what I have, several date fields that add a certain number of days
based on criteria for meeting deadlines. For instance, field 1 is a package
mail date, field 2 is a 45-day reminder date field, field 2 adds 45 days to
the date in field 1 and populates field 2 with the calculated date, but I
need users to be able to change the date in field 2. This is the expression
I've put in the default value: =DateSerial(Year([Package Mail
Date]),Month([Package Mail Date])+3,Day([Package Mail Date]+90)), but now
when I put in a package mail date of 12/1/05, the 45-day reminder date is
calculating as 11/8/03...weirder yet.

Any assistance would be greatly appreciated...btw, I am not all that well
versed in Access so please forgive my ignorance.

Regards,
Jean


"Rick B" wrote:

Make the calculated date the default for that field. Then your users could
change it if needed.


--
Rick B



"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?




  #5  
Old January 4th, 2006, 03:16 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

Allen,

Thanks for your reply...what is the Me.?

"Allen Browne" wrote:

If you need to allow users to change the value in a field, you need to store
it.

Use the AfterUpdate event of the control(s) its value is based on to assign
the inital value. The users can then change it as needed.

For example, if your invoice is normally due 14 days from the InvoiceDate,
but a user can change to to 30 days or something else, you would use this in
the AfterUpdate event procedure of InvoiceDate:
Private Sub InvoiceDate_AfterUpdate()
Me.DueDate = DateAdd("d", 14, Me.InvoiceDate)
End Sub

More info in article:
Calculated Fields
at:
http://allenbrowne.com/casu-14.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?




  #6  
Old January 4th, 2006, 03:22 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

When you set the After Update property to:
[Event Procedure]
and then click the Build button (...) beside the property, Access opens the
code window.

In that context, you can use Me. to refer to the form that this module
belongs to. For example, if the form was named Form1, then Me is equivalent
to:
Forms![Form1]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jdasnoit" wrote in message
...
Allen,

Thanks for your reply...what is the Me.?

"Allen Browne" wrote:

If you need to allow users to change the value in a field, you need to
store
it.

Use the AfterUpdate event of the control(s) its value is based on to
assign
the inital value. The users can then change it as needed.

For example, if your invoice is normally due 14 days from the
InvoiceDate,
but a user can change to to 30 days or something else, you would use this
in
the AfterUpdate event procedure of InvoiceDate:
Private Sub InvoiceDate_AfterUpdate()
Me.DueDate = DateAdd("d", 14, Me.InvoiceDate)
End Sub

More info in article:
Calculated Fields
at:
http://allenbrowne.com/casu-14.html

"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?



  #7  
Old January 4th, 2006, 04:01 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

Thanks Allen...that was very helpful! I really appreciate your assistance on
this, as it's been a while since I've used Access and have forgotten quite a
lot.

I tried your suggestion, but now I get the following error:

Control can't be edited; it's bound to the expression
'DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+3,Day([Package Mail Date]+90))'.

Does this make any sense to you?

"Allen Browne" wrote:

When you set the After Update property to:
[Event Procedure]
and then click the Build button (...) beside the property, Access opens the
code window.

In that context, you can use Me. to refer to the form that this module
belongs to. For example, if the form was named Form1, then Me is equivalent
to:
Forms![Form1]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jdasnoit" wrote in message
...
Allen,

Thanks for your reply...what is the Me.?

"Allen Browne" wrote:

If you need to allow users to change the value in a field, you need to
store
it.

Use the AfterUpdate event of the control(s) its value is based on to
assign
the inital value. The users can then change it as needed.

For example, if your invoice is normally due 14 days from the
InvoiceDate,
but a user can change to to 30 days or something else, you would use this
in
the AfterUpdate event procedure of InvoiceDate:
Private Sub InvoiceDate_AfterUpdate()
Me.DueDate = DateAdd("d", 14, Me.InvoiceDate)
End Sub

More info in article:
Calculated Fields
at:
http://allenbrowne.com/casu-14.html

"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?




  #8  
Old January 4th, 2006, 04:13 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

Change the Control Source property of the text box to the name of the field
where you want the value to be stored.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jdasnoit" wrote in message
...
Thanks Allen...that was very helpful! I really appreciate your assistance
on
this, as it's been a while since I've used Access and have forgotten quite
a
lot.

I tried your suggestion, but now I get the following error:

Control can't be edited; it's bound to the expression
'DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+3,Day([Package Mail Date]+90))'.

Does this make any sense to you?

"Allen Browne" wrote:

When you set the After Update property to:
[Event Procedure]
and then click the Build button (...) beside the property, Access opens
the
code window.

In that context, you can use Me. to refer to the form that this module
belongs to. For example, if the form was named Form1, then Me is
equivalent
to:
Forms![Form1]

"jdasnoit" wrote in message
...
Allen,

Thanks for your reply...what is the Me.?

"Allen Browne" wrote:

If you need to allow users to change the value in a field, you need to
store
it.

Use the AfterUpdate event of the control(s) its value is based on to
assign
the inital value. The users can then change it as needed.

For example, if your invoice is normally due 14 days from the
InvoiceDate,
but a user can change to to 30 days or something else, you would use
this
in
the AfterUpdate event procedure of InvoiceDate:
Private Sub InvoiceDate_AfterUpdate()
Me.DueDate = DateAdd("d", 14, Me.InvoiceDate)
End Sub

More info in article:
Calculated Fields
at:
http://allenbrowne.com/casu-14.html

"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?



  #9  
Old January 4th, 2006, 09:14 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

Hi Rick,

I'm still trying to get this to work. Here is more detail...

Subject: Allowing users to change data in bound fields on form 1/4/2006
11:35 AM PST

By: jdasnoit In: microsoft.public.access.forms


Hello All,

This is a repeat question with the hopes of getting more detailed answers if
I provide a more detailed question.

I have form that is used to populate data on a table, from which queries are
run. On my form, called 'BD Form', I have several calculated date fields.
The dates are calculated off one field 'Package Mail Date' after a date is
entered, and are the 'Package Mail Date' + 10 days, 15 days or 90 days and
then placed in one of the following fieds respectively:
'10 Day Courtesy Call'
'45 Day Reminder' or
'Expiration Date',
and the Control Source for each looks like this:
=DateSerial(Year([Package Mail Date]),Month([Package Mail
Date]),Day([Package Mail Date]+10))
=DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+1,Day([Package Mail Date]+15))
=DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+3,Day([Package Mail Date]+90))

I need to be able to allow users to change the date that is calculated in
the 'Expiration Date' field. I am fairly new to MSA, so idiot proof
instructions are appreciated, and any and all suggestions/assistance are/is
greatly appreciated.

Best Regards,
Jean



"Rick B" wrote:

Make the calculated date the default for that field. Then your users could
change it if needed.


--
Rick B



"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?




  #10  
Old January 4th, 2006, 09:14 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How do I allow users to change a calculated date in a form fie

Hi Allen,

I'm still trying to get this to work. Here is more detail...

Subject: Allowing users to change data in bound fields on form 1/4/2006
11:35 AM PST

By: jdasnoit In: microsoft.public.access.forms


Hello All,

This is a repeat question with the hopes of getting more detailed answers if
I provide a more detailed question.

I have form that is used to populate data on a table, from which queries are
run. On my form, called 'BD Form', I have several calculated date fields.
The dates are calculated off one field 'Package Mail Date' after a date is
entered, and are the 'Package Mail Date' + 10 days, 15 days or 90 days and
then placed in one of the following fieds respectively:
'10 Day Courtesy Call'
'45 Day Reminder' or
'Expiration Date',
and the Control Source for each looks like this:
=DateSerial(Year([Package Mail Date]),Month([Package Mail
Date]),Day([Package Mail Date]+10))
=DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+1,Day([Package Mail Date]+15))
=DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+3,Day([Package Mail Date]+90))

I need to be able to allow users to change the date that is calculated in
the 'Expiration Date' field. I am fairly new to MSA, so idiot proof
instructions are appreciated, and any and all suggestions/assistance are/is
greatly appreciated.

Best Regards,
Jean



"Allen Browne" wrote:

Change the Control Source property of the text box to the name of the field
where you want the value to be stored.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jdasnoit" wrote in message
...
Thanks Allen...that was very helpful! I really appreciate your assistance
on
this, as it's been a while since I've used Access and have forgotten quite
a
lot.

I tried your suggestion, but now I get the following error:

Control can't be edited; it's bound to the expression
'DateSerial(Year([Package Mail Date]),Month([Package Mail
Date])+3,Day([Package Mail Date]+90))'.

Does this make any sense to you?

"Allen Browne" wrote:

When you set the After Update property to:
[Event Procedure]
and then click the Build button (...) beside the property, Access opens
the
code window.

In that context, you can use Me. to refer to the form that this module
belongs to. For example, if the form was named Form1, then Me is
equivalent
to:
Forms![Form1]

"jdasnoit" wrote in message
...
Allen,

Thanks for your reply...what is the Me.?

"Allen Browne" wrote:

If you need to allow users to change the value in a field, you need to
store
it.

Use the AfterUpdate event of the control(s) its value is based on to
assign
the inital value. The users can then change it as needed.

For example, if your invoice is normally due 14 days from the
InvoiceDate,
but a user can change to to 30 days or something else, you would use
this
in
the AfterUpdate event procedure of InvoiceDate:
Private Sub InvoiceDate_AfterUpdate()
Me.DueDate = DateAdd("d", 14, Me.InvoiceDate)
End Sub

More info in article:
Calculated Fields
at:
http://allenbrowne.com/casu-14.html

"jdasnoit" wrote in message
...
How do I allow users to change a calculated date in a form field?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto fill a field every row? Brian Using Forms 1 August 1st, 2005 07:35 PM
Field Before Update property Robert_L_Ross Using Forms 5 June 11th, 2005 05:39 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM
Dates in a listbox connected to a form... RusCat Using Forms 13 November 25th, 2004 02:31 AM
Still Hoping for help with a Query problem Don Sealer Using Forms 15 November 13th, 2004 06:24 AM


All times are GMT +1. The time now is 02:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.