How can a default value be inserted when running a query, enter no value?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anastasio86
    New Member
    • May 2010
    • 4

    How can a default value be inserted when running a query, enter no value?

    Hi,

    I want to find the way to make a query that when the user runs it and enter no value, the applicacation inserts the default value. For example, the query asks to give a certain time period (From-To). If the user inserts no value, the programme returns the default period. Is it possible?
  • Jim Doherty
    Recognized Expert Contributor
    • Aug 2007
    • 897

    #2
    Originally posted by anastasio86
    Hi,

    I want to find the way to make a query that when the user runs it and enter no value, the applicacation inserts the default value. For example, the query asks to give a certain time period (From-To). If the user inserts no value, the programme returns the default period. Is it possible?
    May I suggest the you have a look at the general principle of "Query by Form" as it is generally referred to in Access.

    You will get much more more control this way because you pass to the query the relevant parameters via control values on a form. You will have all the power of the forms underlying VBA at your fingertips to control what happens if a parameter value is empty and so on

    Comment

    Working...