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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in report for missing fields

Status
Not open for further replies.

shyamsundar

Programmer
Aug 23, 2002
75
0
0
IN
on click event of a button, I have created a dynamic query, and open a report based on query.

Now the problem is, in query a value is calculated from field a & field b, some times there is no value is given for a and/or b then the value is take directly from field c

for examples

if a <> 0 and b<>0 then
qry = &quot;select a,b,(a*b) as value from table&quot;
else
qry = &quot;select c as value from table&quot;
endif

if it is first case no problem, if it is second case it is prompting for a value and b value, as there are fields for this in the report. how to overcome this.

Please help

Shyam
cwizshyam@yahoo.com
 
Start your else line with
qry = &quot;SELECT 0 AS a, 0 AS b, c etc.
Hope this helps!
Kindest regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top