-
Filtering Datalist
can samebody help me with this simple problem.
I have 2 datalist and 2 ADO control in my program. the first datalist is name DATABRANCH and second is DATAEMPLIST. ADO control name AdoEmployee for employee table and AdoBranch for table branch.
I want to filter the employee name by branch.
i set the ADO control to this...
DATABRANCH rowsource is ADOBRANCH and ListField is branch_nm
DATAEMPLIST rowsource is ADOEMPLIST
Can someone help me with this.....
Thanks....
Here is my code...
Option Explicit
Dim branchQuery As String
Private Sub Form_Load()
branchQuery = "SELECT tblemployee.branch_nm, tblemployee.lname, tblemployee.fname, tblemployee.mname from tblemployee JOIN tblbranch ON tblemployee.Branch_id = tblbranch.branch_id where tblemployee.branch_nm = "
DataEmpList.ListField = "lname"
End Sub
Private Sub DataBranch_Click()
On Error Resume Next
AdoEmployee.RecordSource = branchQuery & "'" & DataBranch.Text & "'"
End Sub
Similar Threads
-
By Psion in forum ASP.NET
Replies: 2
Last Post: 12-05-2005, 04:56 PM
-
By silverfox_1188 in forum ASP.NET
Replies: 0
Last Post: 05-11-2005, 08:34 PM
-
By jrothlander in forum ASP.NET
Replies: 6
Last Post: 04-27-2005, 04:43 PM
-
By Tim Giese in forum VB Classic
Replies: 0
Last Post: 07-31-2001, 11:31 AM
-
By Carlos Gonzalez in forum ASP.NET
Replies: 0
Last Post: 02-15-2001, 03:54 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks