Hi Folks,
I've got two different data sets.
Number One Contains:
ID(Primary Key), Name, Surname, AreaCode(Foreign Key)
Number Two Contains:
AreaCode(Primary Key), AreaName
Now I want to have all the area's names in my dropdownlist,
but I want to display the area that has been selected for a certain id.
So when I load the app the Area that has been selected say For id 001
to be displayed (and that info is in DataSet 1)
And when i click to see the list i want to see the Area names (and that info is in DataSet 2)
========================================================================
I know about the inner join my SQL Statement looks like this
MainDataTable = Populate("SELECT " _
+ "tblJobReq.Job_ID, tblJobReq.Date, tblArea.Area_Name, " _
+ "tblEmployee.FirstNames + ' ' + tblEmployee.Surname AS Operator, " _
+ "dTblEmp1.FirstNames + ' ' + dTblEmp1.Surname AS 'Requested By', " _
+ "dTblEmp2.FirstNames + ' '+ dTblEmp2.Surname AS 'Attended By' , " _
+ "tblJobReq.Time_Req, tblJobReq.Time_Att, tblJobReq.Time_Comp, " _
+ "tblJobTypes.Type, tblJobReq.Comment " _
+ "FROM tblJobReq " _
+ "INNER JOIN tblArea " _
+ "ON tblJobReq.Area_ID = tblArea.Area_ID " _
+ "INNER JOIN tblJobTypes " _
+ "ON tblJobReq.Job_Type = tblJobTypes.[Job ID] " _
+ "INNER JOIN tblEmployee " _
+ "ON tblJobReq.CRO_ID = tblEmployee.EmployeeID " _
+ "INNER JOIN(SELECT EmployeeID, FirstNames, Surname " _
+ "FROM tblEmployee AS tblEmployee_1) AS dTblEmp1 " _
+ "ON tblJobReq.Req_ID = dTblEmp1.EmployeeID " _
+ "INNER JOIN (SELECT EmployeeID, FirstNames, Surname " _
+ "FROM tblEmployee AS tblEmployee_2) AS dTblEmp2 " _
+ "ON tblJobReq.Att_ID = dTblEmp2.EmployeeID ")
But my application should emulate an ms access form, where you can see what is selected but when you click the dropdownmenu to change it the it only displays the option in the area table for example.
when I use this datatable the dropdown menu contains duplicates, and that I don't want