InfilcoLee
Technical User
I currently have a table in Microsoft access that I am trying to pull data from and then put into a ComboBox in Visual Basic. The following code is taken from a training manual that I am currently using. I am new to Visual Basic.
Dim rs As Object
Err.Clear
Dim sSql$
sSql = "SELECT NOMSPEC From NominalSpec WHERE(type = 'AT_Process')"
If Not gProjectDb.ExecuteSQL(sSql, rs) Then Exit Function
If rs Is Nothing Or rs.EOF Then Exit Function
Do While Not rs.EOF
cmbPspecNom.AddItem rs.Fields("NOMSPEC")
cmbPspecNom.Text = NominalSpec.Text
rs.MoveNext
Loop
I am getting a Compile Error when trying to write the .dll file. "Method or data Member not found". The error is referring to my line of code where I am using ".AddItem"
Some of the information in the code like "AT_Process, NominalSpec,and NOMSPEC refer to variables that are specific to what I am trying to implement.
Any suggestions?
Dim rs As Object
Err.Clear
Dim sSql$
sSql = "SELECT NOMSPEC From NominalSpec WHERE(type = 'AT_Process')"
If Not gProjectDb.ExecuteSQL(sSql, rs) Then Exit Function
If rs Is Nothing Or rs.EOF Then Exit Function
Do While Not rs.EOF
cmbPspecNom.AddItem rs.Fields("NOMSPEC")
cmbPspecNom.Text = NominalSpec.Text
rs.MoveNext
Loop
I am getting a Compile Error when trying to write the .dll file. "Method or data Member not found". The error is referring to my line of code where I am using ".AddItem"
Some of the information in the code like "AT_Process, NominalSpec,and NOMSPEC refer to variables that are specific to what I am trying to implement.
Any suggestions?