Recordset with "and" and "or"

MarionD

Registered User.
Local time
Today, 15:59
Joined
Oct 10, 2000
Messages
425
I think this should be easy but......

I Need to select a recordset based on multiple conditions - basically

Set kids = db.OpenRecordset("Select * from qry_BeitragBerechnen where tblxx_familie_id=" & Familie!ID & " and " & "[Invbegindate]<=" & RundateEnd)

This works fine but now I need to add

" and " & "[InvEnd ] <=" & RundateEnd & " or " & isNULL ([InvEnd])

Basically
Family_Id =x
and
InvBeginDate <= x
andInvEndDate <= x or Null

Hope this makes sense to someone:)
Thanks
Marion
 
Add them, but include parentheses around the 2 in the OR test.
 
Thank you!
Works now:D:D
 

Users who are viewing this thread

Back
Top Bottom