Slowness with Dlookup used against Ms Access SQL Server database (1 Viewer)

nector

Member
Local time
Today, 12:47
Joined
Jan 21, 2020
Messages
368
This is very strange for me when I use the Dlookup on the Ms Access with split tables the speed is well fine as long as there are some indexes. But when I use the same code below against Ms Access with SQL server database, all my god its extremely slow. Any solution or how to replace it?

Code:
transaction.Add "OriginalInvoiceNumber", DLookup("OrignalInvoiceNumber", "tblCustomerInvoice", "[InvoiceID]= " & Me.CboEsdInvoices)

This quite annoying!!

By the way this is Json format!
 

Ranman256

Well-known member
Local time
Today, 05:47
Joined
Apr 9, 2015
Messages
4,337
just run the Dlookup against the table:

vVal = DLookup("OrignalInvoiceNumber", "tblCustomerInvoice", "[InvoiceID]= " & Me.CboEsdInvoices)

not sure what your TRANSACTION does, but my plain sql dlookups run fast.
 

Users who are viewing this thread

Top Bottom