Scarlet_Pimp
New member
- Local time
- Today, 22:56
- Joined
- Aug 6, 2025
- Messages
- 5
I'm trying to do a lookup in vba with sql where I search for the value of a textbox in two linked tables.
But I can't seem to get the syntax right. Any help would be much appreciated.
Code:
sql = "SELECT Bestelbon, Productnaam FROM Planning INNER JOIN Tanks " & _ "ON Planning.Productcode = Tanks.Productcode WHERE Planning.Bestelbon = " & Me.txtSearch & ""
But I can't seem to get the syntax right. Any help would be much appreciated.