View Full Version : Insert Variable Into a Query


Darrell Wootton
11-08-2004, 08:58 AM
Hi,

I know how to prompt for information via the QBE for an existing field, but how do I create a new field in an existing query that will also prompt the user for a variable when the query runs?

Thanks

Daz....

sfreeman@co.mer
11-08-2004, 09:26 AM
Pretty simple. Just a dd a new field... call it whatever you want, then the data that will fill that field. Then insert the prompt just the same way you would for any other field. This example is totally meaningless, but should illustrate...

SELECT
tblMain.RecNo
, Now() AS NewField

FROM
tblMain

WHERE
(((Now())=[Please enter last date:])); :cool: