Good afternoon,
Based on what Jonnymagee stated, I would like to know whether this problem can be solved the same way.
I have created a Data Access Page (DAP) Form. What I would like to do is, when the form is closed, the macros or queries will run. If this is a regular form, I have no problem. The VBA codes will run right away, at the "ON CLOSE" action.
I could not find any properties similar to "ON CLOSE" in the DAP designed form.
I tried to create a simple macros that will open the Data Access Page and have couple of queries behind them. However, it seems that when the DAP opens the form, the queries run right away. The queries are working fine but they provide no result because we need to input something in the DAP or save the record first.
I do appreciate of any suggestions that you can provide. I realize that DAP is not using VBA. But is it possible that, when the form closed, the queries or macros can run?
Let say the query name is Qry_AddRecordtotheDatabase. The MSODSC.EXECUTE should be something like:
MSODSC.EXECUTE Qry_AddRecordtotheDatabase? Do I need a dot or something after Execute? If I have two queries, all I have to do is to repeat the MSODSC, am I correct?
Another question is, can the MACROS be executed in the MSODSC.EXECUTE command?
Thank you again for your response. This is an outstanding community and a great place for self-education in the DAP.