Connecting to Microsoft Access...
LiteView2 Enabled
Modern Web UI inside Microsoft Access
LiteView2 Capabilities — Demonstrated Live
○ WebView2 Engine ○ HTML in Access ○ VBA→JS Data Push ○ Native Recordset ○ JS→VBA Bridge ○ PDF Export

# Modern Analytics Dashboard

Powered by LiteView2 — Real-time Microsoft Access Data

Total Revenue
—
Awaiting data...
Total Orders
—
From tblSales
Avg Order Value
—
Per transaction
Data Source
—
rows in tblSales
Monthly Revenue Trend
Revenue by Category
Top 10 Customers (click to drill down)

# | Customer | City | Revenue | Orders
--- | --- | --- | --- | ---
Waiting for data...

Regional Performance
Target vs Actual — by Category

Waiting for data...

▶ ▶ Last JSON Payload from Access Proves data bridge is active

    Waiting for first data push...

▶ ▶ LiteView2 Environment Info
LiteView2 Version—
Access Version—
Database Path—
Record Count—

### LiteView2 API Patterns Used in This Demo

#### VBA → JavaScript (Data Push)

`m_lv.PushRecordset rs, "onTrendData"`

VBA opens a DAO Recordset from Access. LiteView2 serializes every row to JSON and calls window.onTrendData(array) directly in this page. Zero manual JSON building in VBA.

#### JavaScript → VBA (Event Bridge)

`window.chrome.webview.postMessage({ action: "refresh" })`

Any JS button click posts a message. LiteView2 fires WebMessageReceived in the VBA form module, where the action is parsed and handled natively — including opening other Access forms.

#### KPI Push (Structured JSON)

`m_lv.PostWebMessageAsJson "{""type"":""kpis"", ""revenue"": 182394, ...}"`

For aggregated data (not a recordset), VBA builds a JSON string and posts it. The page receives it via window.chrome.webview.addEventListener('message', ...).

#### PDF Export

`m_lv.PrintToPdf "C:\path\report.pdf"`

LiteView2 renders this exact HTML page to a PDF using Chromium's print engine. No third-party tools. The PrintToPdfCompleted event fires when done.

#### Multi-Form Support

Click any customer row above. VBA receives the customer ID via JS→VBA bridge, then calls DoCmd.OpenForm "frmCustomerDetail" — opening a second Access form that contains its own LiteView2 control.