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!

Recommended Answers

All 2 Replies

Sorry. Could not follow your requirement correctly. Can u plz explain more specifically with sample data.

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

Regards
Shaik Akthar

i hv a database where all the details that im inputting at the front end(which is a form) has to be stored for example.... in my VB sheet im asking for the employee name... then the ID number stored in the table Emp_Details should be retrieved, be displayed in the form and stored in my new database where details of my form are getting stored...
i hope im clear nw... sorry!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.