Filter by first two numbers

  • Thread starter Thread starter Gator
  • Start date Start date
G

Gator

I have a Table with ID's like....010101, 010102, 020101, 020102,....
First, I want to make list0 show distinct first two numbers, like....
01
02
03
then I want list2, which will contain the full numbers to be filtered by
those first two numbers from list0's selection.
Something like,

list0_click
list2.RowSource="Select ID FROM Table1 WHERE ***FIRST TWO LETTERS IN
LIST2(TABLE1) ARE LIKE LIST0

many thanks
 
Use the LEFT function. WHERE LEFT(MyField, 2) = "00"

Please keep in mind that the LEFT (as well as the similar RIGHT and MID)
function is a string function. It will return a string. You will have to
compare the result to another string. "20" does not equal 20.
 
how do I get list0 to only list the first two numbers, of the same number,
only once in the list, and not all the records?
 
Back
Top