Without having created a linked table in your current database?
You'd need to instantiate a reference to the Access Application object,
assign a database to it using the OpenCurrentDatabase method and then use
the DCount:
Dim objAccess As Access.Application
Set objAccess = New Access.Application
objAccess.OpenCurrentDatabase "C:\MyFolder\MyFile.mdb"
MsgBox "There are " & objAccess.DCount("*", "TableName") & " rows in
table TableName"
objAccess.CloseCurrentDatabase
Set objAccess = Nothing
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Dave said:
Can anyone tell me if you can use the DCOUNT function to get the count of
records from a table in a remote database? How would you go about doing
this?