Wednesday, August 18, 2010

How can i filter records using control arrays?

I want to filter my records on msaccess using control arrays of command buttons on vb6.


There are 26 buttons labeled A-Z.


How should i type my sql?


I have mine, but this one doesn't work, hope you guyz could find what's my mistake.


Tnxs...








ADOSTUDENTS.RecordSource = ';SELECT * FROM TBLSTUDENTS WHERE STUDNAME LIKE 'CMDFILTER(Index).Caption%'; ';


ADOSTUDENTS.Refresh








Everytime I clicked on the cmdfilter, I just got a blank record. I also had a datagrid to view all records, and whenever I tried to exit the program after i click the cmdfilter, some error appear.








Microsoft Datagrid control


';Empty row cannot be inserted. Row must have at least one column value set.';








what does it mean?How can i filter records using control arrays?
Try this





1. LIKE ''; %26amp; CMDFILTER(Index).Caption %26amp; ';%'';


OR


2. LIKE ''; %26amp; CMDFILTER(Index).Caption %26amp; ';*'';
  • love myspace
  • myspace girl
  • No comments:

    Post a Comment