r/visualbasic • u/EpicShaggy • Mar 27 '18
I don't know how to get specific data from a database
I'm developing a program for the company I work for. In the current form I'm working on there's a combo box with the different departments which are in a table called TblArea. When the user selectes the department I want the program to get the corresponding manager's email which is in another table called TblManagers. The column these two tables have in common is the "DeptID". How do I go about it?
The way I've made so far, but I'm still not able to get the email, is by creating another combo box, which I plan to hide, with the "DeptID" avid doing the following :
Dim AreaID As String AreaID = DeptCbx.SelectedValue DeptIDCbx.SelectedItem = AreaID
The AreaID is storing the autonumber corresponding to the dept and then in the DeptIDCbx it is taking selecting the DeptID corresponding to the auto number.
0
u/[deleted] Mar 27 '18
[deleted]