Expert guide
Private, Local AI for Microsoft Access Data
Classify, extract and summarise sensitive records without sending them to the cloud
Call us at +1 (385) 386-3860
Short answer: install a local model runner such as Ollama on a capable Windows PC or server, download a small open-weight model, and call its local HTTP API from Access VBA, the same way you would call a cloud AI API but at an internal address. Records never leave your network. Local models handle classification, field extraction and short summaries well; for complex reasoning, cloud models are still stronger. We design these setups within AI workflow automation projects.
Clinics, law firms, accountants, HR departments and government contractors often have the strongest reasons to use AI on their Access data and the strongest reasons not to send that data anywhere. Patient notes, case files, payroll records and client financials are exactly the text AI is good at summarising, and exactly what contracts and regulators restrict. Running the model yourself changes the trade-off.
How a Local Setup Works
Model runner
Ollama, LM Studio or a similar tool runs on a PC or server and loads a model into memory.
Local API
The runner listens on an address such as http://localhost:11434 or http://ai-server:11434 on your network.
Access VBA
Your database posts a prompt to that address and receives the answer, just like a cloud call.
Firewall
The AI machine does not need internet access once the model is downloaded.
Hardware: What Is Realistic
| Setup | Model size it handles comfortably | Good for |
|---|---|---|
| Office PC, 16 GB RAM, no GPU | Small models (around 3–4B parameters) | Classification, short extraction, low volume; slow but workable |
| PC with 8–12 GB GPU | 7–8B parameter models | Most per-record tasks at practical speed |
| Workstation with 24 GB+ GPU | Larger models (around 14–32B, quantised) | Better summaries and longer documents |
| Dedicated server, multiple GPUs | Large models | Team-wide use, high volume |
Model sizes and requirements change quickly. Treat these as starting points and test with your own documents; speed and accuracy on your data are what matter.
Setting Up Ollama on Windows
Install Ollama for Windows on the machine that will run the model.
Open a command prompt and pull a model, for example: ollama pull llama3.1:8b (choose a current model suited to your hardware).
Test it: ollama run llama3.1:8b and type a question.
For network use, set the OLLAMA_HOST environment variable to 0.0.0.0 so other PCs can reach it, and restrict access with Windows Firewall to your Access users' machines.
Calling the Local Model From Access VBA
Ollama offers an OpenAI-compatible endpoint, so the code is almost identical to a cloud call, minus the API key.
Option Compare Database
Option Explicit
Private Const LOCAL_AI_URL As String = "http://ai-server:11434/v1/chat/completions"
Private Const LOCAL_MODEL As String = "llama3.1:8b"
Public Function AskLocalAI(ByVal instruction As String, ByVal inputText As String) As String
Dim http As Object, body As String
body = "{""model"":""" & LOCAL_MODEL & """,""temperature"":0," & _
"""messages"":[{""role"":""system"",""content"":""" & JsonEsc(instruction) & """}," & _
"{""role"":""user"",""content"":""" & JsonEsc(inputText) & """}]}"
Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0")
http.setTimeouts 5000, 5000, 60000, 300000 ' local models can be slower
http.Open "POST", LOCAL_AI_URL, False
http.setRequestHeader "Content-Type", "application/json"
http.send body
If http.Status <> 200 Then
Err.Raise vbObjectError + http.Status, "AskLocalAI", Left$(http.responseText, 200)
End If
AskLocalAI = ReadContent(http.responseText)
End FunctionJsonEsc and ReadContent are the helper functions from connecting MS Access to the OpenAI API. Because the interface is the same, you can switch a given task between local and cloud by changing two constants, which makes side-by-side testing easy.
Getting Good Results From Smaller Models
Narrow the task
One job per call: classify, or extract, or summarise. Not all three.
Constrain the answer
Give a fixed list of categories or an exact output format and validate it in a query afterwards.
Shorten the input
Send the relevant field, not the whole record. Smaller models degrade on long inputs.
Use temperature 0
Consistency matters more than creativity for business data.
Give examples
Two or three worked examples in the instruction raise accuracy noticeably on small models.
Local vs Cloud: Choosing Per Task
| Factor | Local model | Business cloud API |
|---|---|---|
| Data leaves your network | No | Yes, under contract terms |
| Quality on complex tasks | Lower | Higher |
| Setup and maintenance | Hardware, updates, monitoring | API key and billing |
| Cost model | Upfront hardware, near-zero per call | Pay per use |
| Works offline | Yes | No |
| Speed | Depends on your hardware | Generally fast |
Typical Private Use Cases
Clinics: summarising visit notes or classifying referral letters in an Access patient tracker.
Law firms: tagging matter notes and extracting dates from correspondence.
HR: categorising exit interview comments without sending them out.
Finance: classifying transaction descriptions for entities with strict data agreements.
Labs: extracting values from internal result sheets.
Industry guides that pair with this: law firm matter tracking in Access and clinic no-show tracking. For the broader data-safety question, read is it safe to use ChatGPT with company data.
What Local AI Does Not Solve
Running the model locally removes the question of where data goes during processing. It does not replace access controls on the database, audit logging, backups, retention rules or the need for human review of AI output. A local model that any PC on the network can call with any data is a new risk, not a safeguard. Restrict who can reach it and log what it is asked.
FAQ
Local AI with Access FAQ
Hardware, quality and privacy