Document Editing Problems

Create a Dynamic Access Request Form in Word 2016

Jason MillerJason Miller Nov 20, 2026 869 views

Question details

Create an access request form that displays permissions for the site selected by the user.

Create a Dynamic Access Request Form in Word 2016
Product
Microsoft Word 2016
Device & OS
not provided
Scenario
A user selects a site and chooses from its available permission checkboxes, potentially using data stored in database tables.
Observed behavior
The desired form updates its permission options when the selected site changes.
Before you start

Enable the Developer tab in Word through File > Options > Customize Ribbon, then select Developer. Plan the site and permission names and confirm whether they will be entered in VBA or retrieved from a database.

Solution 1Recommended

Build a VBA UserForm with site-specific checkboxes

Use a UserForm when the available permission choices need to change as the user selects a site.

This example uses predefined sites and three checkbox controls. Adapt the names and permissions to your access request process; retrieving choices from a database requires additional connection and query code.

1
Create the UserForm

In Word, select Developer > Visual Basic. In the VBA editor, select Insert > UserForm, then use the Toolbox to add a ComboBox and three CheckBox controls.

2
Name the controls

Select the form and controls, and use the Properties window to name them UserForm1, cboSite, chkPermission1, chkPermission2, and chkPermission3. Add a label or other instructions if needed.

3
Add the form code

Double-click UserForm1 and enter the following code in its code window: Private Sub UserForm_Initialize() cboSite.AddItem "Site A" cboSite.AddItem "Site B" chkPermission1.Visible = False chkPermission2.Visible = False chkPermission3.Visible = False End Sub Private Sub cboSite_Change() chkPermission1.Value = False chkPermission2.Value = False chkPermission3.Value = False chkPermission1.Visible = False chkPermission2.Visible = False chkPermission3.Visible = False Select Case cboSite.Value Case "Site A" chkPermission1.Caption = "Read" chkPermission2.Caption = "Edit" chkPermission1.Visible = True chkPermission2.Visible = True Case "Site B" chkPermission1.Caption = "View reports" chkPermission2.Caption = "Manage users" chkPermission3.Caption = "Approve requests" chkPermission1.Visible = True chkPermission2.Visible = True chkPermission3.Visible = True End Select End Sub

4
Add a macro to open the form

In the VBA editor, select Insert > Module and enter: Sub ShowAccessForm() UserForm1.Show End Sub Return to Word and save the document through File > Save As as a Word Macro-Enabled Document (.docm).

5
Test the site selection

In Word, select Developer > Macros, choose ShowAccessForm, and select Run. Choose each site in the dropdown and check that the corresponding permissions appear and previous selections are cleared.

6
Add a submission action

In the VBA editor, add a CommandButton to UserForm1 and write its Click event to handle cboSite.Value and the selected checkbox values, such as by writing them to the document or submitting them through an approved database connection.

Enable only trusted macros: The form depends on VBA. Recipients must be able to run trusted macros under their organization's security settings; the example does not include database connectivity or a finished submission workflow.
Free Microsoft Office alternative

Prepare access request documents with WPS Writer

WPS Office is a free, lightweight alternative for editing access request documents in a familiar interface. Its Microsoft Office format compatibility helps users migrate existing documents, but it does not fix or replace the Word-specific VBA UserForm described above.

Edit access request instructions and document templates in WPS WriterOpen and edit Microsoft Word DOCX documentsWork in a familiar, easy-to-use document interfaceUse a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why use a UserForm instead of checkboxes directly in the document?

A VBA UserForm can respond to the site dropdown's Change event and show or hide checkbox controls. Create one in Developer > Visual Basic > Insert > UserForm.

Can the form load sites and permissions from a database?

Yes, VBA can retrieve them using an appropriate database connection and queries. Add code to populate the site dropdown and update permissions for the selected site, and use credentials and access controls approved by your organization.

How do I save the form so the VBA code remains available?

Select File > Save As and choose Word Macro-Enabled Document (.docm). A standard DOCX file cannot retain the VBA project.

Will this example submit the access request automatically?

No. Add a CommandButton to the UserForm and write its Click event to collect the selected site and permissions, then save or submit those values using your chosen workflow.