0

The following SQL is a simple query but I can't figure out why it is returning more results than it should. The combobox 5 on Form1 has a drop down selection of 1,2,3,4, or 5. If I leave this blank, it will return the entire data set, how if I select 2 as an example, the data set returns data where Field1 is 2 as well as others such as 1,3,4, or 5.

Any thoughts? I am connected to Table1 through an ODBC connection

SELECT Table1.*
FROM Table1
WHERE (((Table1.Field1)=Forms!Form1!CMB5 Or IsNull(Forms!Form1!CMB5)));
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
AlmostThere
  • 557
  • 1
  • 11
  • 26

1 Answers1

0

Apparently details are important(jk they always are). when creating an ODBC connection, it asks a very important question which is to select a unique identifier. I did not select a unique identifier which was causing the errors with my views. I found the answer here "Why does linked view give different results from MS Access vs SQL Manager?".

Community
  • 1
  • 1
AlmostThere
  • 557
  • 1
  • 11
  • 26