Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback?
In this article. Select Objects is the only item in the Toolbox that doesn't draw a control. The most important reports are the Table Summary list of tables and how many records each has , and the Deep Analysis data dictionary with fieldname, data type, size, and statistics about the values in each field.
Code Documenter. You can also create a query that lists the main object names and types in your database. Better yet, get the Add-in. Document Calculated Fields in Queries. Do you have calculated fields in queries of your database? In addition to the SQL statement to see all your equations and fields with aliases, there is also code to create an Excel Workbook with the results and format it.
Data Dictionary, Display Control. Cool way to change other things too -- perhaps a procedure you want to run depending on what field it is and what else was chosen that you added in? Change what you like to suit what you need; leave attributions in the code, and keep it open.
Document Hyperlinks from Pasted Text with Excel. VBA code to document hyperlinks in the Active Workbook. Goto Top. How to make an add-in. An add-in lets you run code in any database without having to create or import modules. Add-ins can save time and make your code more accessible. How to make and install an add-in for Microsoft Access.
USysRegInfo table, add-in properties, code tips. Data Dictionary. Now it is quick and easy to get a Data Dictionary for any table in whatever database you have open.
Optionally, export the data dictionary information to a text file so you can look at it somewhere else, like NotePad or Excel.
A bonus is being able to filter the tables listed lots of different ways. Write reports to Microsoft Word using automation. SQL statements are formatted so they are easier to read. Bad SQL statements are marked so you can fix them. Records are counted if the SQL runs successfully. Save and Restore Table Size and Position. Save and restore the position and size of open tables.
This is like Excel's Save Workspace feature. A little surprise might be that it creates a temporary database and links instead of storing anything in the currentdb.
Color VBA Code. Contacts Goto Top. My Contacts. Personal contact management application in Access. Keep track of names, addresses, phone numbers, email address, and websites; lists and categories Make lists for who you want to send a card or gift to, or keep in touch with for another reason.
Contact Management Template. Complex Contact Management Template to track names, addresses, phones, emails, websites, lists, notes attachments, more. Create an unbound check box, option button, or toggle button. Understand option groups. Create an option group.
Add a new option to an existing option group. By contrast, option buttons and toggle buttons are most often used as part of an option group. For more information about option groups, see the section Understand option groups.
The following illustration shows the three controls and how they represent Yes and No values. The Yes column shows the control as it appears when selected, and the No column shows the control as it appears when cleared. Open the form or report in Layout view or Design view by right-clicking it in the Navigation Pane, and then clicking the view you want on the shortcut menu. Depending on the setting of the field's Display Control property, a check box, a text box, or a combo box is created and bound to the field.
If you want, you can change the check box control to an option button or a toggle button. To do this, right-click the check box, point to Change To on the shortcut menu, and then click Toggle Button or Option Button. You can use an unbound check box, option button, or toggle button in a custom dialog box to accept user input and then carry out an action based on that input. Open the form or report in Design view by right-clicking it in the Navigation Pane, and then clicking Design View on the shortcut menu.
Although it is not required, you might want to rename the control so that it has a more meaningful name. Doing so does not change the label displayed next to the control, but it can make it easier to refer to it in expressions or macros. If you want, you can change the check box to an option button or a toggle button. An individual check box, option button or toggle button can be bound or unbound, or it can be part of an option group.
An option group displays a limited set of alternatives, and only one option in an option group can be selected at a time. An option group consists of a group frame and a set of check boxes, toggle buttons, or option buttons. If an option group is bound to a field, only the group frame itself is bound to the field, not the controls contained inside the frame.
Instead of setting the Control Source property for each control in the option group, you set the Option Value property of each control to a number that is meaningful for the field to which the group frame is bound.
When you select an option in an option group, Access sets the value of the field to which the option group is bound to the value of the selected option's Option Value property.
The value of an option group can only be a number, not text.
0コメント