Change default date for Date Picker in 2007

R

Rose B

Does anyone know how to change the date that the Date Picker will focus on
for a particular field? It will seems default to the current date, or to the
date value of the field but I would like to be able to set it equal to the
date value of another field on the form.
 
S

S.Clark

in the form, you can set the default for the field to be equal to the other
field name.

e.g. =[Otherfieldname]

Set this in the Properties Window of the form.

In the case where the 'other field' has to be entered, then set the desired
field in the AfterUpdate of the 'other field'.
 
R

Rose B

Well, I thought this too - but in this case, I am setting the value of the
'other field' when the form is called. I then set the default for the
'dependent field' to =[Otherfieldname] - but when the form loads, the 'other
field' has the intended date, the 'dependent field' has no date and so the
date picker defaults to current date. Since the user will likely accept the
date of the 'other field' then the after update event won't be called. I
don't know why the default setting isn't working. (Interestingly, if I set
the default date of the 'other field' to Date()+30, and the default date for
the 'dependent field' to the 'other field' then the date picker for the
'dependent field' actually uses current date + 30 as the starting point!

S.Clark said:
in the form, you can set the default for the field to be equal to the other
field name.

e.g. =[Otherfieldname]

Set this in the Properties Window of the form.

In the case where the 'other field' has to be entered, then set the desired
field in the AfterUpdate of the 'other field'.

Rose B said:
Does anyone know how to change the date that the Date Picker will focus on
for a particular field? It will seems default to the current date, or to the
date value of the field but I would like to be able to set it equal to the
date value of another field on the form.
 
S

S.Clark

I can't say i follow all of that, but maybe try setting the dependent fields
value in the on current.

I guess I'll explicitly state that I don't believe you can change the
starting date for the date picker, which is why I'm trying to focus you on
getting the desired date into the field, such that the user doesn't need to
touch the date picker.

Rose B said:
Well, I thought this too - but in this case, I am setting the value of the
'other field' when the form is called. I then set the default for the
'dependent field' to =[Otherfieldname] - but when the form loads, the 'other
field' has the intended date, the 'dependent field' has no date and so the
date picker defaults to current date. Since the user will likely accept the
date of the 'other field' then the after update event won't be called. I
don't know why the default setting isn't working. (Interestingly, if I set
the default date of the 'other field' to Date()+30, and the default date for
the 'dependent field' to the 'other field' then the date picker for the
'dependent field' actually uses current date + 30 as the starting point!

S.Clark said:
in the form, you can set the default for the field to be equal to the other
field name.

e.g. =[Otherfieldname]

Set this in the Properties Window of the form.

In the case where the 'other field' has to be entered, then set the desired
field in the AfterUpdate of the 'other field'.

Rose B said:
Does anyone know how to change the date that the Date Picker will focus on
for a particular field? It will seems default to the current date, or to the
date value of the field but I would like to be able to set it equal to the
date value of another field on the form.
 
R

Rose B

OK - thanks - knowing that you can't nominate a start date for the date
picker helps. I need to allow the users to pick a date since the date
suggested might not be the right one (this is being used for bookings, where
there is a 'from' date and a 'to' date - they are often the same, but not
always, but the 'to' date always has to be after the 'from'. Thanks for your
input - much appreciated.

S.Clark said:
I can't say i follow all of that, but maybe try setting the dependent fields
value in the on current.

I guess I'll explicitly state that I don't believe you can change the
starting date for the date picker, which is why I'm trying to focus you on
getting the desired date into the field, such that the user doesn't need to
touch the date picker.

Rose B said:
Well, I thought this too - but in this case, I am setting the value of the
'other field' when the form is called. I then set the default for the
'dependent field' to =[Otherfieldname] - but when the form loads, the 'other
field' has the intended date, the 'dependent field' has no date and so the
date picker defaults to current date. Since the user will likely accept the
date of the 'other field' then the after update event won't be called. I
don't know why the default setting isn't working. (Interestingly, if I set
the default date of the 'other field' to Date()+30, and the default date for
the 'dependent field' to the 'other field' then the date picker for the
'dependent field' actually uses current date + 30 as the starting point!

S.Clark said:
in the form, you can set the default for the field to be equal to the other
field name.

e.g. =[Otherfieldname]

Set this in the Properties Window of the form.

In the case where the 'other field' has to be entered, then set the desired
field in the AfterUpdate of the 'other field'.

:

Does anyone know how to change the date that the Date Picker will focus on
for a particular field? It will seems default to the current date, or to the
date value of the field but I would like to be able to set it equal to the
date value of another field on the form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top