[AccessD] When a query refers to a control on a form which is not open - how to supply a default?

Doug Steele dbdoug at gmail.com
Wed Jun 2 09:10:32 CDT 2010


Change the query to a parameter query; then your code controls the value
that is passed to the query.

Doug

On Tue, Jun 1, 2010 at 3:43 PM, Bill Benson (vbacreations) <
vbacreations at gmail.com> wrote:

> SELECT TblCIB.RecordID, TblCIB.ShopOrder, TblCIB.ItemNumber FROM TblCIB
> WHERE (((TblCIB.RecordID)=[Forms]![frmExciterIndividualEntry]![RecordID]))
>
> The above sql is causing the user to be prompted for a value of
> [Forms]![frmExciterIndividualEntry]![RecordID] when that form is not open
> and/or the control not populated. I would like that when there is no form
> or
> control available at runtime, the query just assumes a 0 or "" [default] so
> that my users are not prompted. Is there some simple [single expression]
> way
> to do this short of the workaround I show below, which seems like
> overkill??
>
>



More information about the AccessD mailing list