I am using the following VBA to fetch data from an Access database. The query works but there is a lot of information in the database and the response time is very slow, about 30 seconds.Is there any part of the code that I could optimise or write differently?Sub test()Dim strsql1, tr As StringDim rst As ADODB.Recordsetstrsql1 = SELECT * FROM FP WHERE SUBMISSION_ID = 5683;Set cn = New ADODB.Connectioncn.Open Provider=Microsoft.ace.OLEDB.12.0; Data Source=\\REDACTED.accdb;Set rst = New ADODB.Recordsetrst.Open strsql1, cn, adOpenStaticEnd Sub
Excel VBA used to fetch Access data
performance;vba;excel;ms access