# Forms Spec — AR-Reconciliation-Tool

Control naming convention: `cmd` = CommandButton, `txt` = TextBox, `lbl` = Label, `lst` = ListBox.
Position is in inches (x, y, width, height), relative to the form's Detail section.
`OnClick Handler` is either a backtick-wrapped VBA statement (inserted verbatim into a
`<Control>_Click` event procedure), or `—` if the control has no click behavior.

## frmMain

| Control | Type | Caption | Position (x,y,w,h) | OnClick Handler |
|---|---|---|---|---|
| lblTitle | Label | "AR Reconciliation Tool" | 0.2,0.2,3,0.3 | — |
| cmdImport | CommandButton | "Import" | 0.2,0.7,1.5,0.4 | `DoCmd.OpenForm "frmImport"` |
| cmdReconcile | CommandButton | "Reconcile" | 2.0,0.7,1.5,0.4 | `modReconcile.RunReconcile` then `DoCmd.OpenForm "frmReconcileResult"` (two statements — Reconcile only writes to tblReconcileResult, it does not show results on its own) |
| cmdExport | CommandButton | "Export" | 3.8,0.7,1.5,0.4 | `modExport.RunExport` |

## frmImport

| Control | Type | Caption | Position (x,y,w,h) | OnClick Handler |
|---|---|---|---|---|
| lblFilePath | Label | "File path:" | 0.2,0.2,1,0.3 | — |
| txtFilePath | TextBox | "" | 1.3,0.2,3,0.3 | — |
| cmdBrowse | CommandButton | "Browse..." | 4.4,0.2,1.2,0.3 | `modImport.BrowseForFile` |
| cmdStartImport | CommandButton | "Start Import" | 0.2,0.7,1.5,0.4 | `modImport.RunImport` |
| lblStatus | Label | "" | 0.2,1.2,4.5,0.5 | — |

## frmReconcileResult

| Control | Type | Caption | Position (x,y,w,h) | OnClick Handler |
|---|---|---|---|---|
| lstResults | ListBox | "" | 0.2,0.2,5,3 | — |
| cmdExport | CommandButton | "Export Report" | 0.2,3.4,1.8,0.4 | `modExport.RunExport` |
| cmdClose | CommandButton | "Close" | 2.2,3.4,1.2,0.4 | `DoCmd.Close` |

Global state: modUtil's module-level Public variable named gCurrentBatchID (type Long)
holds the active ImportBatchID, shared across forms — set by the Import handler above,
read by the Reconcile and Export handlers above when called with no explicit batchID
argument (both default batchID to -1, meaning "use the global"). Not written as a
backtick-fenced Module.Proc reference here on purpose — this is prose explaining a
variable, not another handler cell, and the validator's handler regex would otherwise
double-count it against the table rows above.
