| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi- I've got a problem with the code below. Not so much with the SELECT statement, but with the results. It I import the data from the server this query works great, but with a LINK it returns incorrect results. As an example with a link this query will return a recordcount of 1. If I do a findfirst then findlast then findfirst it will find, correctly 3 records. This is all based on the same 'Account_number' and History_Event_NTD range for both examples. WHAT IS IT WITH ODBC LINK VS. AN ODBC IMPORT THAT CAUSES SELECT STATEMENT NOT TO RETURN THE COMPLETE AMOUNT OF DATA AND HOW CAN WE GET AROUND THIS PROBLEM? Scott Set ALTRANHD_rst = CurrentDb.OpenRecordset("SELECT ALTRANHD.* FROM ALTRANHD " & _ " WHERE (((ALTRANHD.ACCOUNT_NUMBER)='" & ALTRANDT_rst!Account_Number & "')" & _ " AND ((ALTRANHD.HISTORY_EVENT_NTD)>='" & ALTRANDT_rst!HISTORY_EVENT_NTD & "'" & _ " AND (ALTRANHD.HISTORY_EVENT_NTD)<='" & ALTRANDT_rst!HISTORY_EVENT_NTD + 0.003 & "'))" & _ " ORDER BY ALTRANHD.ACCOUNT_NUMBER, ALTRANHD.HISTORY_EVENT_NTD, ALTRANHD.INCIDENT_NUMBER;") |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.