Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAN you use SQL as the control source?

Status
Not open for further replies.

xicana

Technical User
Dec 11, 2003
100
US
I need a text box to show something like this:

if txtPeriod < 07 then
select NumSold
where itemNo=txtItem and year=2004
else
select NumSold
where itemNo=txtItem and year=2003

i know this isn't the right syntax - just trying to relay the logic.

The query that is the underlying source of the report holds the information that I need...I just need to set those conditions.



Sandy
 
I just read the thread right below mine...
I'll try to use the dlookup function and see if that works

Sandy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top