By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

VB 6.0 and MS Access

P: 1
how i can call MS Access form or report in vb6. i have project in vb and a report in access which i want to call vb6. any one can help . . . . . .
Sep 4 '07 #1
Share this Question
Share on Google+
1 Reply


QVeen72
Expert 100+
P: 1,445
Hi,

Open Access Report :

Expand|Select|Wrap|Line Numbers
  1.    Dim objAccess As Object
  2.    Set objAccess = CreateObject("Access.Application")
  3.    objAccess.OpenCurrentDatabase "C:\MyDB.mdb', False
  4.    objAccess.DoCmd.OpenReport strRptName, acPreView, strFilter, _
  5.       strWhere
  6.    objAccess.Quit acExit
  7.    Set objAccess = Nothing
  8.  
To Open Form(All remains Same ):
Expand|Select|Wrap|Line Numbers
  1. objAccess.DoCmd.OpenForm "frmMyForm", acNormal, , , 
  2. acFormReadOnly, AcWindowMode 
  3.  
  4.  
Regards
Veena
Sep 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.