473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Call a macro from a field in a record

My vb code saves a record as a Word merge data file and merges it with
a Word merge form file. Once the merge is complete, I would like the
code to make this determination:

There will always be a field in the merge data file called
[OptionalChainedMacroName]. It may or may not be blank. If it is not
blank, I would like to call a macro after finishing the merge. The
macro to be called is equal to the contents of the
[OptionalChainedMacroName].

In this example, lets say the contents of the field
[OptionalChainedMacroName] is "Macro_For_Form_A."
Sub Macro_For_Form_A() exists in the normal.dot.

If the field in the merge data file called [OptionalChainedMacroName]
is not blank, call Macro "Macro_For_Form_A" after finishing the merge.
Aug 4 '08 #1
1 1369
On Mon, 4 Aug 2008 11:23:07 -0700 (PDT), sl*******@yahoo.com wrote:

Check out DoCmd.RunMacro in the help file.

-Tom.
Microsoft Access MVP

>My vb code saves a record as a Word merge data file and merges it with
a Word merge form file. Once the merge is complete, I would like the
code to make this determination:

There will always be a field in the merge data file called
[OptionalChainedMacroName]. It may or may not be blank. If it is not
blank, I would like to call a macro after finishing the merge. The
macro to be called is equal to the contents of the
[OptionalChainedMacroName].

In this example, lets say the contents of the field
[OptionalChainedMacroName] is "Macro_For_Form_A."
Sub Macro_For_Form_A() exists in the normal.dot.

If the field in the merge data file called [OptionalChainedMacroName]
is not blank, call Macro "Macro_For_Form_A" after finishing the merge.
Aug 5 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Edgar | last post by:
I want to go from viewing a form (record number "x") to the same record ("x") in a report. Of course, when I open the report, it opens to the first record, not record "x". I don't know VBA,...
1
by: John Baker | last post by:
HI: I have a drop down box on a form, which I am linking to a query on my client table, producing two fields client and clientID (the record ID). On a click on the appropriate record, I...
0
by: RookieCard | last post by:
I've been stuck on this for 2 days. Here's the deal. I am working (3 levels down/deep)in a subform within a tab object that is within another tab obeject. Everything works great! Except here: 1)...
0
by: MHenry | last post by:
Hi, I know virtually nothing about creating Macros in Access. I would appreciate some help in creating a Macro or Macros that automatically run(s) 14 Queries (three Make Table Queries, and 11...
3
by: cect425mike | last post by:
I'm trying to design and write a little module (or macro even) for someone in my office, but I'm having some trouble. I have the following database structure (Note: just some sample data,...
2
by: Keith Austin | last post by:
I need to produce a macro for a project that I have to do in my course in IT "Certificate III IT (Software Applications) Unit ICAITUO18C". The macro needs to validate previously imported data from...
5
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
3
by: redbenn | last post by:
Hello, I am trying to create an excel macro, that when clicked... a specific cell will match a record in my database, and update certain fields in this record. The Excel file will have a cell...
5
by: ladybug76 | last post by:
Hi. I'm working on a database and I though I tinker with Macros and VB, I am not very versed in them. So ANY help would be HUGELY appreciated!!! (I'm using Access 2003) What I need to do...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.