Hi all
i am new to access and have never done any programming ect
i am trying to create a search form using 3 combo box to filter records in a sub box.
my goal is to be able to select a cable gland type from a drop down box. then select the size of the gland from a second box (a - h) and finally in the 3rd box select the thread size of the gland. once all 3 boxes are filled in in the sub form id like the full record of that particular gland with information like the certification and application
i have been following a tutorial on youtube calledAccess: How to Create Search Form Using Combo box Part 1
https://www.youtube.com/watch?v=8N1hRBdsI1s
but when it comes to the sql code i cannot get it to work
my code is as followed
Private Sub bombobox1_AfterUpdate()
Dim glandname As String
glandname = "select * from GLANDS where ([GLAND] = " & Me.bombobox1 & ")"
Me.glandsub1.Form.RecordSource = glandname
Me.glandsub1.Form.Requery
End Sub
a quick break down of the tables ect
GLANDS is my table containing gland names sizes thread and certification
GLAND is the field containing 5 different glands
bombox1 is the combo box im trying to use as the first drop down menu
glandsub1 is the sub form in the search form i am creating
when i run the code i get no errors until i select an item from the combo box
from there i get various different error codes
i have attached a pdf containing print screens of my database