Default for Parameter

  • Thread starter Thread starter Claire
  • Start date Start date
C

Claire

Hi:

Is it possible to set a default for a parameter query?

I have a table that holds the system date. I would like the year of the
system date to be the default value in the parameter. Is that possible?

Thanks
Claire
 
Not visible, but you can use the nz function to use get a default value when the
user doesn't enter anything in the parameter input box. If you want to have a
visible default value and do any error checking you have to use a form and a
control as the source.

Criteria: NZ([What year? Leave blank for current year.],Year(Date())

The user won't see anything but the prompt and an empty control, but if they
click OK, the current year will be set.
 
Very cool! Thanks very much John.

Not visible, but you can use the nz function to use get a default value when
the
user doesn't enter anything in the parameter input box. If you want to have
a
visible default value and do any error checking you have to use a form and a
control as the source.

Criteria: NZ([What year? Leave blank for current year.],Year(Date())

The user won't see anything but the prompt and an empty control, but if they
click OK, the current year will be set.
 
Back
Top