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  

Default value



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 03:49 PM posted to microsoft.public.access.forms
piku
external usenet poster
 
Posts: 8
Default Default value

hello!

I put in new form two fields of Date.
when i set value in the first date i want the default value in the second
date will be the value of the first date but i want can to change it.
In the properties of the second date i put "=[FirstDate]" but when i am
enter a value in the first he don't copy it to the second.

I need it work from the properties! I think It must...
what I can do?
  #2  
Old March 23rd, 2010, 05:30 PM posted to microsoft.public.access.forms
Kc-Mass
external usenet poster
 
Posts: 362
Default Default value

Hi,

Try this: In the afterupdate event of txtFirst Date enter code as "
txtDateSecond = txtDateFirst"

Regards

Kevin

"piku" wrote in message
...
hello!

I put in new form two fields of Date.
when i set value in the first date i want the default value in the second
date will be the value of the first date but i want can to change it.
In the properties of the second date i put "=[FirstDate]" but when i am
enter a value in the first he don't copy it to the second.

I need it work from the properties! I think It must...
what I can do?



  #3  
Old March 24th, 2010, 01:17 AM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Default value

As Kevin suggested you cannot use

=[FirstDate]

in the Control Source of the second date field if you want to be able to
change the data in the field. It has to be done as he suggests.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201003/1

  #4  
Old March 24th, 2010, 03:45 PM posted to microsoft.public.access.forms
piku
external usenet poster
 
Posts: 8
Default Default value

it's not working...

i tried create new macro with SetTempVar func but he didn't do it.
the argument is: [SecondFeild],[FirstField]

what i can do?

"kc-mass" wrote:

Hi,

Try this: In the afterupdate event of txtFirst Date enter code as "
txtDateSecond = txtDateFirst"

Regards

Kevin

"piku" wrote in message
...
hello!

I put in new form two fields of Date.
when i set value in the first date i want the default value in the second
date will be the value of the first date but i want can to change it.
In the properties of the second date i put "=[FirstDate]" but when i am
enter a value in the first he don't copy it to the second.

I need it work from the properties! I think It must...
what I can do?



.

  #5  
Old March 25th, 2010, 01:56 PM posted to microsoft.public.access.forms
Kc-Mass
external usenet poster
 
Posts: 362
Default Default value

Hi Piku,

Do this. In design view of the form right click on the first date field.
Click on the
"Properties" then Events Tab; click on the line next to "After Update". A
button
with 3 dots will appear to the right of that line. Click on that button.
The system
ill ask if you want to invoke the "Expression Builder" or "Macro Builder" or
"Code Builder". Click on code builder. It will present you with something
like:

Private Sub FirstDateBox_AfterUpdate()

End Sub

Add a line in between the two above lines like

Private Sub FirstDateBox_AfterUpdate()
txtDateSecond = txtDateFirst
End Sub

Change the above "txtDateSecond = txtDateFirst" to include
your first and second text boxes.

Save the code and form.

Regards

Kevin




"piku" wrote in message
...
it's not working...

i tried create new macro with SetTempVar func but he didn't do it.
the argument is: [SecondFeild],[FirstField]

what i can do?

"kc-mass" wrote:

Hi,

Try this: In the afterupdate event of txtFirst Date enter code as "
txtDateSecond = txtDateFirst"

Regards

Kevin

"piku" wrote in message
...
hello!

I put in new form two fields of Date.
when i set value in the first date i want the default value in the
second
date will be the value of the first date but i want can to change it.
In the properties of the second date i put "=[FirstDate]" but when i am
enter a value in the first he don't copy it to the second.

I need it work from the properties! I think It must...
what I can do?



.



 




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


All times are GMT +1. The time now is 12:23 PM.


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