Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: Running Acess macros from VB

    Hi

    I have an access insert table query with parameters

    I execute this using Visual basic

    docmd.openquery "summ1",acviewnormal,acedit

    I need to pass parameters to this say month and year.

    I tried the following

    docmd.openquery "summ1",acviewnormal,acedit,,"[month]=" & mm,"[year]=" & yy

    but that resulted in runtime error.

    Any ideas

    spa

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Is this a vb app or access using vbscript ? Do you want to run a macro or open a query ?

  3. #3
    Join Date
    Jan 2004
    Posts
    3
    Originally posted by rnealejr
    Is this a vb app or access using vbscript ? Do you want to run a macro or open a query ?
    Hi,

    This is a VB app trying to execute a access macro which is running a insert table query with parameters ....

    insert into...

    as select....

    where <condition>

    Thanks
    SPA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •