eratech
Posts: 513
|
Posted: 08/19/2016, 1:13 AM |
|
@dodaniel
To answer you last question - It depends on when you want it to run. If you want the selections to change when you change the drop down, then the Dependent Dropdown builder is the best.
For something that happens when the page loads then DLookup is very useful.
The online or Help file has a description of each of the DLookup properties, but here is an example I've used:
Expression (the 'SELECT' part): "name"
Domain (the 'FROM' or table part): "organisations"
Criteria ('WHERE' part): "ID="&CCGetFromGet("orgid",0)
Connection : drop-down selection of the Record connection to the database
Convert result to : Integer (or Text or whatever)
Type Of Target : (Control to put the value into a field, or Variable to save to a variable or can save to Session etc)
Target: select control name or type in variable name.
The Criteria is usually the most complex as you can put all sorts of things in and as long as it is a valid WHERE clause then it will be Ok.
If you look at the CCDlookup code you can get the SQL to test too.
Cheers
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |