D2 Newbie Q: Filtering a Database

Hi all,

This is bit of a continuing saga since I'm still very new Delphi. But
many thanks again for the many who assisted with the previous questions.

There are 3 more questions relating to Filtering:

1. What is the syntax for filtering on a TDBCheckbox? I have Speed Button
called sbBusiness. The Paradox database table name is taINTERNET, which
has a field "_BusInd".

 if sbBusiness.down then begin
   with dmCONSULT.taINTERNET do begin
     Filter := '_BusInd.Checked = True';
     Filtered := True;
 else begin
   with dmCONSULT.taINTERNET do begin
     Filtered := False;

I get an error: "Invalid filter expression character: '.''.

Any ideas?

2. Is it possible for a filter to limit in addition to a previous
selection. ie. I have a group of buttons that select Web Sites or FTP
Sites. This is done using Filter and Speed buttons. I will have another
pair of buttons that select Business or Personal. If the Web Site and
Business buttons are pressed together: It should just show Business Web
Sites. Do I need to code nested ifs to do this? Any suggestions as to how
to code this?

3. Finally, I want text box filter that limits the DBGrid to show just
items which contain the entered text. On the form there is a check box
called ckFilterToggle and a edit box called edFilterText. The text should
be compared with the database field "Descrip".

I have this coded within the form:

 procedure TfmCNETBED0.ckFilterToggleClick(Sender: TObject);
   dmCONSULT.taINTERNET.Filtered := ckFilterToggle.Checked;

 procedure TfmCNETBED0.edFilterTextChange(Sender: TObject);
   ckFilterToggle.Checked := True;
   dmCONSULT.taINTERNET.Filtered := True;

and within the Data Module an OnFilterRecord Event for the table
taINTERNET which reads:

 procedure TdmConsult.taINTERNETFilterRecord(DataSet: TDataSet;
   var Accept: Boolean);
   Accept := Dataset['Descrip'].Value = fmCNETBED0.edFilterText.Text;

I get an Error message: "Variant method calls not supported" on

Once again, I'm dumbfounded.

Many thanks in advance to anyone who responds to any of the questions.


      _____  __  __________  ????????????????????????????????????????????
  /\       ) __) ___       | Adrian H. D. Bell      adb...@ozemail.com.au
 /  \     /    \ |_  |_ |_ | I.T. Contractor        
/    \___/ _____)|_________| SAP Systems Specialist Brisbane,   AUSTRALIA
    SAP Resource Centre  http://www.ozemail.com.au/~adbell/saprectr.html