Hi Guys,
Can anyone help me with my SQL here,
the recordset pulls a field called [field_name] but it must not = the var "progenyname" or the text values 'Unknown2' and 'Unknown'
The code below runs but still picks out the 'Unknown2' for some reason.
Any thoughts are very welcome.
Thanks
C
("SELECT * FROM table1 WHERE ([Field_name] <> 'Unknown2')And ([field_name] not like '*" & Replace$(progenyname, "'", "''"
& "*')And ([Field_name] <> 'Unknown') And ([Field_sire] = " & progenysire & "
Or ([Field_dam] = " & progenydam & "
"
Can anyone help me with my SQL here,
the recordset pulls a field called [field_name] but it must not = the var "progenyname" or the text values 'Unknown2' and 'Unknown'
The code below runs but still picks out the 'Unknown2' for some reason.
Any thoughts are very welcome.
Thanks
C
("SELECT * FROM table1 WHERE ([Field_name] <> 'Unknown2')And ([field_name] not like '*" & Replace$(progenyname, "'", "''"