Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to handle RowSourceType = 3 SQL Statement?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00447002
Message ID:
00447009
Views:
10
You might want to re-post this, but add a few CR's in your < PRE > block.
>I have a Complaint combobox on a form and just below it I have a Subcomplaint combobox. In the Subcomplaint combobox I put an SQL SELECT as my RowSource and 3-SQL statement as my RowSourceType. When you pick a Complaint from the Complaint combobox it will show related Subcomplaints to choose from in the Subcomplaint combobox. Then, I want to be able to choose a Subcomplaint from the Subcomplaint combobox right after choosing a Complaint from the Complaint combobox.
>
>The Complaint combobox does nothing for the Subcomplaint combobox at this point in time.
>
>The Subcomplaint combobox looks back at the chosen item from the Complaint combobox using the SQL SELECT command as follows in the RowSource property of the combobox:
>
>SELECT lookup.desc, lookup.mailcode, lookup.code FROM lookup WHERE lookup.code = 28 AND ALLT(THISFORM.cboComplnt.List(THISFORM.cboComplnt.ListIndex,2)) = ALLT(lookup.mailcode)
>
>
>I was wondering the best place to stick the USE lookup in 0 SHARED command?
>And the best place to stick the USE IN lookup command? To open and close the Lookup table so I avoid an error when the form runs and inits the Subcomplaint combobox.
>
>And since I have the Complaint combobox right above this one. Where would be the best place to stick the Requery command. In case, I change the choice in the Complaint combobox which would alter the drop-down list in the Subcomplaint combobox.
>
>Thoroughly confused? Join the club. Thanks for the assistance.
>I almost have this thing working, but not quite the way I want. Thanks for helping me out.
censored.
Previous
Reply
Map
View

Click here to load this message in the networking platform