Examine source code through ODBC, DAO or ADO

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Is it possible to examine/extract the code behind a form using ODBC,
DAO or ADO ?

Any suggest links to reference material is appreciated.

Richard
 
ODBC, DAO and ADO are only intended to get at data.

To look at the code associated with a form using VBA, try something like:

Sub SeeCode(NameOfForm As String)
On Error GoTo Err_SeeCode

Dim modCurr As Module
Dim strCode As String

DoCmd.OpenForm NameOfForm, acDesign, , , , acHidden
Set modCurr = Forms(NameOfForm).Module
strCode = modCurr.Lines(1, modCurr.CountOfLines)
Set modCurr = Nothing
DoCmd.Close acForm, NameOfForm, acSaveNo

Debug.Print strCode

End_SeeCode:
Exit Sub

Err_SeeCode:
MsgBox Err.Number & ": " & Err.Description
Resume End_SeeCode

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DAO IS DED 16
ADO vs DAO in Access 2007 8
Recordset ? defaults mdb->DAO, adp->ADO 3
Access 2007 ODBC Error Trapping 8
DAO or ADO 1
DAO Sybase system 11 1
Using ADO in an mdb application 106
DAO to ADO 1

Back
Top