masoud_sedighy
Registered User.
- Local time
- , 17:20
- Joined
- Dec 10, 2011
- Messages
- 132
When I click the buttonA in my form, it runs a macro that there are some update query and a RunCode Action inside that.
update queries will be run buy RunCode does not execute function
Function Name of that is Update_Trend_Line_by_Month ()
I have made a module and put this function inside that:
when I click ButtonA Update queries will be execute but function Update_Trend_Line_by_Month () does not execute.
But when I put the code of this single function (VBA) to the button click event of another form it runs without problem.
But when it is inside macros with some other actions like update queries,
will be run but function does not execute.
Please help how I can solve my problem.
update queries will be run buy RunCode does not execute function
Function Name of that is Update_Trend_Line_by_Month ()
I have made a module and put this function inside that:
Public Function Update_Trend_Line_by_Month()
Dim qdef As DAO.QueryDef
Set qdef = CurrentDb.CreateQueryDef("")
qdef.Connect = CurrentDb.TableDefs("[ASBUILT_LIST]").Connect
qdef.SQL = "EXEC Update_Asbuilt2"
qdef.ReturnsRecords = False ''avoid 3065 error
qdef.Execute
MsgBox "As Built list updated"
End Sub
when I click ButtonA Update queries will be execute but function Update_Trend_Line_by_Month () does not execute.
But when I put the code of this single function (VBA) to the button click event of another form it runs without problem.
But when it is inside macros with some other actions like update queries,
will be run but function does not execute.
Please help how I can solve my problem.