Count total transfer record

mderby

Registered User.
Local time
Tomorrow, 07:58
Joined
Apr 14, 2003
Messages
41
Hi all,

I need to upload a worksheet from Excel to a MS Access DB.
Though I have successfully to this by using the TransferSpreadsheet method, there are no message informing the total of records added to the table.

Here is the code in Excel which call another procedure(ImportRem) in that DB to start the transfer process.

Set appAcc = Access.Application
x = Application.GetOpenFilename _
("Access Files (*.mdb), .mdb", 1, _
"Open Time Sheet Database", , False)
appAcc.OpenCurrentDatabase x
appAcc.Visible = True

appAcc.Run "ImportRem", PathNames

If process is run manually in MS Access, normaly there will be a message saying how many records is going to be added to the table but that seems to be not the case from code.

Hope you all can advise on the correct steps.

mderby
 
You are running the import from Excel ? If your running it from Access there is no need for the Set appAcc = Access.Application
and all consequential appAcc. things.

For your count you can do a dcount or a select count(*) on your table before import and after the diff beeing the imported record(s)

Regards
 
from Excel

Thanks.

I need to upload from Excel cause the source data is from another application which needs some formatting and fields before it can be uploaded to Access.

Will try on the Dcount and select count(*) now.

mderby
 

Users who are viewing this thread

Back
Top Bottom