Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Reports

Status
Not open for further replies.

scasystems

Programmer
Jan 15, 2003
44
GB
Have a front end (reports queries)/ Back end (tables) access databases. Would like to give the user ability to create their own reports.
Trouble is I have an automated update procedure where i send out new frontend with new queries/reports to replace the current one (links are refreshed via VB6).
So if a user has created their own queries these will be lost when the mdb is replaced.
How can I via VB6 import/update only my queries/reports that have changed.
 
Use 2 different MDB's. One exclusively for then users designed stuff. You make the source for the custom reports, the data MDB.
 
May end up doing that but this would still leave me having to create links in the custom.mdb when new tables are added. Surely theres a way of importing (via vb6 want a fully automated system) updated queries/reports.
 
Sussed It in case anyone is interested

Dim db As New ADODB.Connection
Dim cat As New ADOX.Catalog
Dim tbl As New ADOX.Table
Dim axs As New Access.Application

'Sca Reports Database
db.Provider = "Microsoft.Jet.OLEDB.4.0"
db.Properties("Data Source") = login.DatabaseLocation & "1.mdb"
db.Open

Set cat.ActiveConnection = db

axs.OpenCurrentDatabase App.Path & "\custom.mdb"
'On Error Resume Next
For Each tbl In cat.Tables
If tbl.Type = "LINK" Then
'MDB Link
axs.DoCmd.TransferDatabase acImport, "Microsoft Access", login.DatabaseLocation & "1.mdb", , tbl.Name, tbl.Name, True
ElseIf tbl.Type = "PASS-THROUGH" Then
'DBF Link
axs.DoCmd.TransferDatabase acImport, "Microsoft Access", login.DatabaseLocation & "1.mdb", , tbl.Name, tbl.Name, True
End If
Next
 
"Advanced" search. Keywords: "FE"; "BE"; "Update"; MSysObjects; et al there are several threads with full discussion and much of the detailed code necessary. Doesn't "Destroy" objects in the updated db.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top