pass parameter to macro

krishnarao

Registered User.
Local time
Today, 23:10
Joined
Jun 11, 2007
Messages
12
I have builded macro in msAccess which calls query1 which takes date as parameter. I have to call this macro from VB6.0 application along with date value? I tried below code which prompts date value when executed from VB6.0

Dim app As New Access.Application
app.OpenCurrentDatabase "database.mdb"
app.DoCmd.RunMacro "mDtEff"
Set app = Nothing

How to pass parameter to macro from VB6.0(it should not prompt date)? pls assist.

Thanks In Advance,
 
What exactly is your macro doing? you should be able to replicate it via VB6.

David
 
Macro calls query where date is been passed as parameter. Query as below...

Select * from tbl where dte>=[Dt];
 
But what are you doing with the macro? what is it purpose? what you have described can be done through vb using recordsets.

More info needed.

David
 

Users who are viewing this thread

Back
Top Bottom