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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|