please help... i have a vb program which needs to search for employee name inside empmas.mdb, specifically empmas table. the user will input the idnumber on a textbox and from that it will search the name of the employee and display it in a label in my vb program.
all i have is this:
Dim db As Database
Dim rs As Recordset
Dim SQLString As String
Set db = OpenDatabase("C:\empmas.mdb")
-------------------
Hi m8, im new to vb myslef but i have managed to successfully do something simular to this.
Dim Cmd2 As OleDb.OleDbCommand
Dim Con2 As OleDb.OleDbConnection
Dim Sql2 As String = Nothing
Dim Reader2 As OleDb.OleDbDataReader
Dim ComboRow2 As Integer = -1
Dim Columns2 As Integer = 0
Dim Category2 As String = Nothing
Con2 = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OleD b.4.0;data source=FAQs.mdb")
Sql2 = "SELECT Question FROM tblQuestion " & _
"WHERE Category_Id = '" & strChosenQuestion & "'"
Cmd2 = New OleDb.OleDbCommand(Sql2, Con2)
Con2.Open()
Reader2 = Cmd2.ExecuteReader()
While Reader2.Read()
For Columns2 = 0 To Reader2.FieldCount - 1
Category2 = Reader2.Item(Columns2) 'READ COLUMN FROM DATABASE
Next
cboQuestion.Items.Add(Category2)
ComboRow2 += 1
End While
Con2.Close()
c if this helps...