Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View to query differently depending on value of form pro
Message
 
 
To
12/12/2000 11:37:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00452108
Message ID:
00452307
Views:
22
>Thanks for the responses - I will have a look at using variables.
>
>I take it you mean to set the conditions and put them into the variables, and then run the query using &cVar.

>AND Ccmslook.lk_type = "AB"
>WHERE Careplan.cl_ref = ?thisForm.lcCl_Ref

Macro expansion is not needed. Do something like:
cCL_Ref = thisForm.lcCl_Ref
cIA_Ref = IIF(thisForm.cAssessment="I", thisForm.lcIa_Ref, "")
cCO_Ref = IIF(thisForm.cAssessment="C", thisForm.lcCo_Ref, "")
cCI_Ref = IIF(thisForm.cAssessment="P", thisForm.lcCi_Ref, "")

Select ... WHERE
  Ccmslook.lk_type = "AB" AND
  Careplan.cl_ref = ?cCL_Ref AND
  Careplan.ia_ref = ?cIA_Ref AND
  Careplan.co_ref = ?cCO_Ref AND
  Careplan.ci_ref = ?cCI_Ref
ORDER BY Careplan.cp_type
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform