Refresh Form after using Date Picker

tuismith

New member
Local time
Yesterday, 22:49
Joined
Apr 8, 2010
Messages
1
I need a form to refresh after I use the date picker.

For simplicity, two dates (birthDate, deathDate) are part of a table and are pulled into a form where a formula calculates the age of the person.

The built-in date picker in Access is used to select the dates on the form(no problems occure when the date is typed in manually, the problem occurs when using date picker).

I want the age formula to refresh after using the date picker when I tab to a new object (clicking on a new object already refreshes the formula-no problem there).

In addition, I want to place a control on the date that requires the deathDate to occur after the birthDate. This control should occur after I move away from the deathDate object. If the control is triggered by a bad date, the deathDate should be made blank on the form.

If there is another post with the solution, please let me know.
 
I need a form to refresh after I use the date picker.

For simplicity, two dates (birthDate, deathDate) are part of a table and are pulled into a form where a formula calculates the age of the person.

The built-in date picker in Access is used to select the dates on the form(no problems occure when the date is typed in manually, the problem occurs when using date picker).

I want the age formula to refresh after using the date picker when I tab to a new object (clicking on a new object already refreshes the formula-no problem there).

In addition, I want to place a control on the date that requires the deathDate to occur after the birthDate. This control should occur after I move away from the deathDate object. If the control is triggered by a bad date, the deathDate should be made blank on the form.

If there is another post with the solution, please let me know.

Welcome to the Forum,

You can add a requery behind the textbox that holds the dates and also use an if statement behind the after update to check that it doesn't conflict with the first date something like this:

if me.deathDate.value<= me.birthdate then

msgox"This date cannot be used, please try again"
me.deathDate.value=""
docmd.gotocontrol "deathDate"
else
exit sub
End if
me. your formula field goes here.requery
 

Users who are viewing this thread

Back
Top Bottom