Full Version: Continous Form - Row Count From Another Table
UtterAccess Forums > Microsoft® Access > Access Forms
I have a continuous form that shows a list of servers. Each server can have 0 to many business processes associated to them. The business processes are stored in a separate table that contains the server name and list of processes.
On my continuous form I would like to display the count of processes associated with the server.
Server Business Processes
Server1 0
Server2 3
Server3 13
Ocan do a count query but in a continuous form I am struggling with how to get the server name from the row to run the query.
Any help would be appreciated.
John Spencer
Do you need to be able to edit the data that is being displayed?
If not, you can use a totals query as the source for the form.
SELECT ServerName, Count(Processes.ServerID) as ProcessCount
FROM ServersTable LEFT JOIN Processes
ON ServersTable.ServerID = Processes.ServerID
GROUP BY ServerName
If you need to be able to edit the records, then you can use the DCount Function as the control source.
Control Source: DCount("*","ProcessesTable","ServerID=" & ServerID)
Display only and your first suggestion worked great. I should have thought of that myself!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.