VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Viewing Filtered data in the DBGRID object though its EMPLOYEE ID number.

by Charlie M. Valizado (4 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 24th April 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Viewing Filtered data in the DBGRID object though its EMPLOYEE ID number.

Rate Viewing Filtered data in the DBGRID object though its EMPLOYEE ID number.



   'Put a label on your form and change the Caption into  "ID NUMBER: " 
   'Put a TEXTBOX on your form, name it TEXT1 
   'Put a Command Button and name it cmdfilter then change the caption    
   '   into "&Filter  "
   'Put a DATA CONTROL on your Form (Form1)
   'Set the DATA CONTROL name into data1
   'sand et the DATABASENAME property to your database.

'Step 2(Write this Code)

'NOTE: I only set the table name as tblemployee

   Private sub cmdfilter_click()
       data1.recordsouce="SELECT * FROM tblEmployee where='" & trim(text1.text) 
        & "'"
       dbgrid.refresh
   end sub 
  



Download this snippet    Add to My Saved Code

Viewing Filtered data in the DBGRID object though its EMPLOYEE ID number. Comments

No comments have been posted about Viewing Filtered data in the DBGRID object though its EMPLOYEE ID number.. Why not be the first to post a comment about Viewing Filtered data in the DBGRID object though its EMPLOYEE ID number..

Post your comment

Subject:
Message:
0/1000 characters