Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Re: VB6 datareports


Message #1 by "Joseph Andrews" <joeandrews1@z...> on Thu, 14 Dec 2000 09:32:03 -0500
I generally use something like the following code.

Const dfreportmsg = "MicroSoft Access will now be loaded and the report
will be created," & vbCrLf & " When you have processed the report, quit
Access to return to this point."

Private Sub mnuMakeReport_Click()
    Dim RetVal
    Dim ShellString As String
    Dim oktogo As Variant
    ShellString = "C:\Program Files\Microsoft     Office\Office\msaccess.exe
C:\DataBaseFolder\DatabaseName /xMacroName /ro"
    dfmsg = dfreportmsg               
    oktogo = MsgBox(dfmsg, vbOKCancel)
    If oktogo = 1 Then RetVal = Shell(ShellString, 3)
End Sub

'the /ro switch opens the database in read only mode which prevents the
'user from modifying the macro,the report or the database
'structure and data

Joe

-- 
Joseph Andrews
joeandrews1@z... - email

---
You are currently subscribed to pro_vb as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-pro_vb-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index