Hi all, I do try to resolve my own problems but this one is a mystery to me as I'm sure that similar has been fine in the past.
I am trying to open a sub set of table "PriceList" which has 900 records and includes the fields ListID(Lng) and Valid(Y/N) but it's not going well...
Dim DB As DAO.Database, rs As DAO.Recordset
Dim strSQL
strSQL = "SELECT * FROM PriceList WHERE PriceList.ListID = " & Me![List33] & " And PriceList.[Valid] = True"
Set DB = CurrentDb
Set rs = DB.OpenRecordset(strSQL)
ListID = Me![List33] is good but I'm getting extra records because it's finding Valid = True and Valid = False.
I've tried various ways of defining Valid = True but clearly I haven't yet found the right one.
Any guidance will be gratefully appreciated. Thanks.
I am trying to open a sub set of table "PriceList" which has 900 records and includes the fields ListID(Lng) and Valid(Y/N) but it's not going well...
Dim DB As DAO.Database, rs As DAO.Recordset
Dim strSQL
strSQL = "SELECT * FROM PriceList WHERE PriceList.ListID = " & Me![List33] & " And PriceList.[Valid] = True"
Set DB = CurrentDb
Set rs = DB.OpenRecordset(strSQL)
ListID = Me![List33] is good but I'm getting extra records because it's finding Valid = True and Valid = False.
I've tried various ways of defining Valid = True but clearly I haven't yet found the right one.
Any guidance will be gratefully appreciated. Thanks.