Hi gang,
I've been banging my head against my desk for around 6 hours trying to figure this out.
I'm using 2 databases. One has all data (data.mdb) and the other has the GUI stuff in it(GUI.mdb).
I'm doing it this way because we want to make the data as secured as possible.
Anyway, I would like to open a recordset in ADO and then show the results in a subform.
This is my current code.
Can this be done?Code:Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim sSQL As String Set cnn = New ADODB.Connection Set rs = New ADODB.Recordset With cnn .ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=D:\DATA.mdb;" .Open End With 'COMPANY_LIST is the table sSQL = "SELECT * FROM COMPANY_LIST" Set rs = cnn.Execute(sSQL) cnn.Close set cnn = nothing set rs = nothing
Also,
I got it working to populate a combo box. But it comes back and says that it can only accept 2,??? characters.
What is the correct way to do this?
Please forgive my dumb questions, but database stuff is really new to me.
Help Please!!!
Thanks,
JazzBass





Reply With Quote