how do i print a access database ???? without showing the program access if possible
thanks in advance RedAngel
Printable View
how do i print a access database ???? without showing the program access if possible
thanks in advance RedAngel
What do you want to print? Report, Form, etc. Are you doijng this from within Access VBA or from VB6?
Hi,
Are you referring to the database schema/metadata? or the objects of the database as what RD stated...
:) :) :)
all feilds in the database from vb6
Create a Report in Access and then just DoCmd.OpenReport passing the report name and the hidden viewstate.
Hi,
Are you referring the values of the fields in the table? or the database schema?
:) :) :)
You can use ADOX for that purpose: set references to regulatar ADO and ADO Ext. 2.x for DDL and Security and run the following code.
NOTE: you will have to provide fully qualified connection string for your database:
VB Code:
Private Sub Command3_Click() '============================ Dim tbl As ADOX.Table Dim cat As ADOX.Catalog Dim con As ADODB.Connection Dim i% On Error Resume Next Screen.MousePointer = vbHourglass Set con = New ADODB.Connection con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\biblio.mdb;" Set cat = New ADOX.Catalog Set cat.ActiveConnection = con For Each tbl In cat.Tables Debug.Print String(24, "-") Debug.Print tbl.Name Debug.Print String(24, "-") For i = 0 To tbl.Columns.Count - 1 Debug.Print tbl.Columns(i).Name Next i Debug.Print vbNewLine Next Set cat = Nothing con.Close Set con = Nothing Screen.MousePointer = vbDefault End Sub