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.
 

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

Back
Top