f



HELP!Unable to run macros in ms access database FROM VB

Iam unable to run a macro from visual basic...
The code does not work when the ms access database(any database ) is open...
HELP!


Dim strDbName As String
Dim strlvsendkeys As String
Dim Objaccess As Object
   strDbName = glopath
    If User_FAS <> "" Then
    strlvsendkeys = "+{TAB}{DELETE}" & User_FAS & "{TAB}"
    If Pwd_FAS <> "" Then
         strlvsendkeys = strlvsendkeys & Pwd_FAS
    End If
        strlvsendkeys = strlvsendkeys & "~"
    End If
    DoEvents
    SendKeys (strlvsendkeys)
  
 Set Objaccess = GetObject(strDbName, "Access.Application")
 Objaccess.DoCmd.RunMacro "mcrValidateArchiveClaims"
 Objaccess.DoCmd.RunMacro "mcrCheckModulesArchive"
 Objaccess.DoCmd.RunMacro "mcrCheckCentreArchive"
 Objaccess.DoCmd.RunMacro "mcrCheckMInfoArchive"
 
 
 Set Objaccess = Nothing

Regards,
Arch
0
archana (1)
7/27/2004 8:53:52 AM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

0 Replies
953 Views

Similar Articles

[PageSpeed] 19

Reply: