access_set_control_props
Modify control properties via COM in design view
How to use it
access_set_control_props is exposed by the MCP Access MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the access_set_control_props tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install MCP Access
claude mcp add access -- python C:\path\to\access_mcp_server.pyOther tools in MCP Access (39)
Modify table structure via DAO: add field, delete field (requires confirm=true), rename field
Close the COM session and release the .accdb file
Create a new control via COM in design view. Supports classname for ActiveX (type 119) ProgID initialization. Use type 128 (acWebBrowser) for native WebBrowser
Create a new empty .accdb database file
Create a new form without triggering the "Save As" MsgBox that blocks COM. Optional hasheader for header/footer section, recordsource (bind to table/query), defaultview (0=Single, 1=Continuous, 2=Datasheet, ...)
Create a relationship between two tables (supports cascade update/delete)
Create a table via DAO with full type, default, description and primary key support in one call. More robust than CREATE TABLE SQL
Delete a control via COM
Delete a module, form, report, query, or macro. Requires confirm=true
Execute multiple SQL statements in one call. Supports mixed SELECT/INSERT/UPDATE/DELETE with per-statement results, stoponerror, and confirmdestructive
Run SQL via DAO — SELECT returns rows as JSON (limit default 500). DELETE/DROP/ALTER require confirmdestructive=true
Generate a Markdown index of all modules, forms, reports, queries
Export form/report/module as text via SaveAsText. Does NOT open Design view. UTF-16 LE output
Export an object's full definition as text
Get the full definition block of a specific control (finds controls inside Pages/OptionGroups)
Read a DB property (CurrentDb.Properties) or Access option (GetOption)
Read form or report properties (RecordSource, Caption, DefaultView, etc.). objecttype required (form or report). Omit propertynames for all
Import form/report/module from text via LoadFromText. Replaces if exists. Auto-splits CodeBehindForm VBA
Deterministic check for objectively-broken layout: contrast (WCAG), overlap, out-of-bounds, truncation, sibling inconsistency, zero-size/invisible. Returns verdict PASS/REVIEW/FAIL. Also runs automatically on every control edit
List all controls of a form/report with key properties. Controls inside Pages/OptionGroups include a parent field
List linked tables with source table, connection string, ODBC flag. name='X' returns one table; namesonly=true is a light listing (no connect strings — use it when hundreds of links overflow the result); maskpassword=true masks PWD=
List objects by type (table, module, form, report, query, macro, all). System tables filtered
List table relationships with field mappings and cascade flags
Change connection string and refresh link — auto-saves credentials (dbAttachSavePWD) when UID/PWD detected. relinkall=true updates all tables with the same original connection. refresh=true re-reads the schema using the table's own connect string (no newconnect, password never dumped)
Search text in the SQL of ALL queries at once (find which queries reference a table, field, or keyword)
Import modified text back (creates or overwrites)
Set a DB property or Access option — creates the property if it doesn't exist
Set form/report properties (RecordSource, Caption, DefaultView, HasModule, etc.) via COM in Design view
Modify properties of multiple controls in a single design-view session
Show table structure via DAO (fields, types, sizes, required, linked status)
Append code at the end of a module. Auto-strips Option Explicit/Option Compare to prevent misplacement
Search text in ONE specific module. To search all modules at once, use accessvbesearchall
Read a line range from a VBA module without exporting the whole file
Get a procedure's code and position by name
List all procedures with their line numbers
Surgical find/replace within a procedure. Atomic by default (a failed patch writes nothing), case-insensitive anchors, optional requireunique, whitespace-tolerant fallback matching + contextual error messages when patches fail. procname='(Declarations)' targets the declarations section
Replace/insert/delete lines in a VBA module directly via VBE
Replace a full procedure by name (auto-calculates line bounds). Strips misplaced Option lines, runs structural health check
Search text across ALL modules/forms/reports in the database at once