hi... ive connected my VB to my data base with the following code....
Private Sub Form_Load()
Set CN = New ADODB.Connection
cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Desktop\DATABASE FINAL\Passport Requirements.mdb"
With CN
.ConnectionString = cString
.CommandTimeout = 20
.CursorLocation = adUseClient
.Open
End With
nw... i want to connect every individual field in my database to another corresponding field for example i hv a combo box(empname) on my form and a label for corresponding ID(empid) and in my database the table name is Employee and fields for these two are E_id E_name... im not able to connect the fields individually... i tried connecting with the following code
Private Sub Form_Load()
OpenDb
Set rstSchema = Cn.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
List1.AddItem "Table name: " & rstSchema!TABLE_NAME & " " & "Table type: " & rstSchema!TABLE_TYPE
rstSchema.MoveNext
Loop
' clean up
rstSchema.Close
Cn.Close
Set rstSchema = Nothing
Set Cn = Nothing
End Sub
please try reply for this soon and i hope im clear enough of the above!...please do let me knw if therez somethin more u want to know!
sorry if therez ny mistakes!