Topics Search

Embedded macro

Embedded macro
Views: 122
I have not worked with embedded macros before. The previous Access developer created one in a form and I am trying to understand how to get to it to view/modify. Since it does not appear in the navigation pane, how can I do this?

In the navigation pane there is a macro "mcrImportDetails". I open that in design view and see the columns Macro name, Conditions, Action & Arguments. The macro I want to look into in the Macro name column is "Import_DailyDetails" - how do I see this in design view? Not sure if my info is vague, please let me know if I can provide any other information. I know that the macro is importing an Excel file
Sponsored Links:

Similar posts...


Run a Embedded Macro from VBA Code

Run a Embedded Macro from VBA Code Icon
I am trying to rerun an embedded macro which is attached to the AfterUpdate event of a combobox. Is there anyway of rerunning this query from VBA Code?

I have tried using:


However it says you need to insert the Macro name however I do not know what the embedded macro is called in order to refer to it

Embedded Macro's

Embedded Macro's Icon
I have been looking over a customer order db that the programmer doesn't't use any Embedded Macro's. Everything is in VBA. I use Embedded Macro's on all my cmdButtons. Whatis the advantage to not using Embedded Macro's.

Create a macro

Create a macro Icon
In Microsoft Office Access 2007, macros can be contained in macro objects (sometimes called standalone macros), or they can be embedded into the event properties of forms, reports, or controls. Embedded macros become part of the object or control in which they are embedded. Macro objects are visible in the Navigation Pane, under Macros; embedded macros are not.

Embedded Macro Test Strategy

Embedded Macro Test Strategy Icon
Does anyone know a good way of testing embedded macros?

When you are building or reviewing the macro, Access does not permit access to any other part of your database and there are lots of reasons why it would be nice to have that ability.

The only help I have found is to have the VB window open so I can check the value of variables and test expressions while I'm building the macro conditions

Storing a DAO.RecordSet/DAO.QueryDef in a TempVar in an Embedded Macro

Storing a DAO.RecordSet/DAO.QueryDef in a TempVar in an Embedded Macro Icon
In an embedded macro, is it possible to use a TempVar to store a DAO.RecordSet or DAO.QueryDef? Or otherwise, is there another way to use a Recordset or QueryDef in an Embedded Macro?

For example, say I have a Table (called myTable), that has 2 fields, ID, myFieldA. I want to make a Form that has an Unbound text box (say, boxA). Then, I want to make an Embedded Macro that queries myTable, using ID as the criteria field, so that the query would return only one record.

The Macro would then temporarily store the RecordSet, so that it would populate thetextbox, boxA, with the value of myFieldA from the query.

I know about binding boxA to myFieldA. I also know how to do this using VBA. But for my purposes here, I want to keep all of the form elements Unbound, and drive the user interface with queries, using only Embedded Macros.

Then I could use smarter logic for doing things such as validating that the user fills in required boxes before writing records to the table, verifying that the user intends to save changes, etc.

(I've had enough pain dealing with Access' clunky BeforeUpdate and AfterUpdate events).

Ebedded Macro won't open form

Ebedded Macro won't open form Icon
I'm trying to get an embedded macro to open a form when the field is clicked. I would think this would be pretty straightforward, but apparently not. The control is a combo box and the onclick event is set for embedded macro. The macro calls OpenForm with the arguments of Reports, From,,,,Normal. I'm not even ask for anything fancy. Just want the form to open. Do you think it might be a problem because I'm trying to open it off a combo box

Encapsulate embedded Marco with IF THEN..

Encapsulate embedded Marco with IF THEN.. Icon
Ive recently started using access 2010 and am busy updating my A2K databases. Just started getting to grips with the beast (table level calculated fields are great). However, these new embedded macros seem to have a mind of their own.

Ive used the wizard to create a delete record button with an embedded macro and it looks good as it takes care of all possible scenarios.

Now, Ive been trying to encapsulate the 3 or so if then statements of the macro (exluding the error handling of course) in an if msgbox(.)=vbYes (or rather = 6) but no matter what I try I cant seem to move the end if to wrap the other If then statements

Printing in Landscape via an Embedded Macro

Printing in Landscape via an Embedded Macro Icon
I created a form and added a button with the embedded Macro that prints the current record only. The macro arguments a select record, print record. My problem is that it prints the record in portrait. I need it to print landscape. How do I change it from portrait to landscape?

Error: 2950 OnClick : Embedded Macro

Error: 2950 OnClick : Embedded Macro Icon
I'm getting the following error message on a form.

MacroName: frmLoadIns Detail : OnClick : Embedded Macro

Condition: True

Action: GoToRecord

Arguments: 2, frmLoadIns, Next,

Error: 2950

I got this when I was entering the command to have the form start at a new record every time it is opened

Default to VBA NOT Embedded Macro

Default to VBA NOT Embedded Macro Icon
I hope someone has some good news about making Access 2007 default to use VBA not embedded macros .