General information
Category:
Coding, syntax & commands
Hi Cetin:
Thanks for helping me again. I have one other small problem, when I select the
casemang or nddetby person from my combobox list I get all the records
for the criteria - meaning if I select noone I get all the records and If a select " bill smith" I get all the reocrds even if he isn't the casemang or nddetby for this record. Do I need to put coun_sum.casemang = thisform.combo2.value or coun_sum.nddetby = thisform.combo2.value somewhere else? Here is the code.
str = ""
If empty(ctod(Thisform.text1.value)) and empty(ctod(Thisform.text2.value))
str = " "
Else
If empty(ctod(Thisform.text1.value))
str = "and act_plan.follow_dte <= ctod(Thisform.text2.value)"
Endif
If empty(ctod(Thisform.text2.value))
str = "and act_plan.follow_dte >= ctod(Thisform.text1.value)"
Endif
If not empty(ctod(Thisform.text1.value)) and not empty(ctod(Thisform.text2.value))
str = "and act_plan.follow_dte >= ctod(Thisform.text1.value) and act_plan.follow_dte <= ctod(ThisForm.text2.value)"
Endif
Endif
set talk on
select distinct client.sin, allt(client.surname) + ", " + allt(client.firstname);
as fullname, client.phone1;
from client;
inner join coun_sum;
on client.sin = coun_sum.sin;
inner join act_plan;
on act_plan.sin = coun_sum.sin;
where(coun_sum.casemang = thisform.combo2.value or coun_sum.nddetby = thisform.combo2.value);
and !empty(act_plan.follow_dte) &str;
and act_plan.fld_up < 1 or act_plan.fld_up > 1;
into cursor finalcursor
If reccount() = 0
messagebox("There are no records found!", 48, "CATS")
Endif
set talk off
REPORT FORM counrpt HEADING "ACTION PLAN BF REPORT" PREVIEW
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only