Re: How do I create a macro to boldface text in Access?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Dorian,

Ok, thanks a lot for the more detailed explanation. I see that you are using the word "edit" in a different way than I do :-).

First of all, did you know that you can format more than one control at a time, using the toolbar buttons? For example, you could select all of the controls on the report which you want to format as Bold, and then one click on the Bold button and they're done.

To do what you are asking, follow these steps...

1. From the Database Window, select Macros tab, and click New.
2. If you can't see a Macro Name column in the macro design window, select it from the View menu.
3. In the Macro Name column type this...
^b
4. In the Action column, enter..
SetValue
5. In the macro arguments towards the bottom of the screen, enter like this...
Item: [Screen].[ActiveControl].[FotnBold]
Expression: Yes
6. Close and save the macro, name it...
AutoKeys

Now, when in design view of your report, the keyboard shortcut Ctrl+B will format the currently selected control as Bold.

--
Steve Schapel, Microsoft Access MVP

Dorian wrote:
Steve -- Thanks again for your response. Here's a more thorough description of what I'm doing:

In the database, there are tables, queries, forms, reports, etc. I am working in the reports -- in Design view. In Design View each report includes textboxes and labels which I am editing for proper prestentation. I understand that every record will be modified by changing its Design View text box or label.

Since I'm editing more than 70 reports, I'm looking for an efficient way to edit the reports (in Design View). For instance, there are hotkey options for moving the text boxes and labels (Ctrl-arrow keys). I would also like to boldface the text boxes and labels through a hotkey. I could not find any in the HELP menus. So, I'm pursuing a Macro solution.

I'm looking for a word-processing feature. Like MS Word's Control-B.

By the way, I will be exporting all the records into RIch Text Format files and then bringing them into PageMaker. But I've found that it's best to format (or edit) as much as possible before exporting to RTF.
.


Quantcast