Hi.
I am having trouble with databases. I want to connect, open and set the recordset in code. Is this possible? i.e. Do I have to put the ADODC on the form? I presume it will be quicker and smaller to do it in code.
If I write it in code, how do I set the text fields to the correct field? And without the ADODC does .refresh etc work as normal?
I have set public connection/database/recordset names.
My current code is;
Thanks in advance,Code:cnBSSAC.Open "provider=microsoft.jet.oledb.4.0;" & "Data Source=c:\database\bssac.mdb" rstBSSAC.Open "commonBSSUser", dbBSSAC, adOpenKeyset, adLockPessimistic, adCmdTable txtFields(3).DataSource = "commonBSSUser" txtFields(3).DataField = "Name"
Paul.




Reply With Quote