Thread: Default value
View Single Post
  #5  
Old March 25th, 2010, 12: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?



.