Larry Haydn
Board Regular
- Joined
- Jul 18, 2019
- Messages
- 207
- Office Version
- 365
- Platform
- Windows
In my Excel VBA Application, I have the following SQL statement:
As you can see, there is no filter in the SQL statement.
There are 389 records in the database.
When I run the SQL Statement in SQL Server Management Studio, it pulls 389 records, as expected.
However, the same SQL statement in VBA pulls out only 349 records.
(50 records missing).
Why?
Anyone encounter similar issues?
I am using Windows 11, version 10.0.22621 Build 22621
VBA Code:
Set rs = SQLConn.Execute("SELECT CustCode, CustName, ProdName, TapeDir, '', ReelLen, BoxQty, SRLblType, '', MoldingMethod, MatType, MatWidth, DimK, SID, RFID, HarmonyID, ReelType FROM PRODMAS ORDER BY CUSTCODE;")
PRODMAS.Range("A2").CopyFromRecordset rs
As you can see, there is no filter in the SQL statement.
There are 389 records in the database.
When I run the SQL Statement in SQL Server Management Studio, it pulls 389 records, as expected.
However, the same SQL statement in VBA pulls out only 349 records.
(50 records missing).
Why?
Anyone encounter similar issues?
I am using Windows 11, version 10.0.22621 Build 22621