I am migrating my application from VBA to VB.Net, and a new problem appears.
Access DB tables and fields:
Example, of table and relationship:
table Devices:
ID_User--Device---WarrantyEnd
2----------Laptop---2016
2----------Monitor--2016
3----------Laptop---2016
table Users:
ID_User--UserName
2----------AAA
3----------BBB
I need to fill a list, and show 3 columns: UserName, Device and WarrantyEnd.
How should the query be in order to get those results? It needs to get the UserName using the relationship.
Here is what I know:
Thanks
Access DB tables and fields:
- Users: ID_User, UserName
- Devices: ID_User, Device, WarrantyEnd
Example, of table and relationship:
table Devices:
ID_User--Device---WarrantyEnd
2----------Laptop---2016
2----------Monitor--2016
3----------Laptop---2016
table Users:
ID_User--UserName
2----------AAA
3----------BBB
I need to fill a list, and show 3 columns: UserName, Device and WarrantyEnd.
How should the query be in order to get those results? It needs to get the UserName using the relationship.
Here is what I know:
Code:
SELECT Users.ID_User, Devices.Device, Devices.WarrantyEnd FROM Users RIGHT JOIN Devices