Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

query with empty cells in record

BaltusBaltus Member Posts: 3
I want to make a query with don't cares (I use "*" as criterium).
It seemed that it only works when the cell is not empty; records with empty cells are ingnored.
How can I select records with any or none information?

strQuerySQL = " (Categorie like '" & strCategorie & "') and " & _
" (Land like '" & strLand & "') and " & _
" (Plaats like '" & strPlaats & "') and " & _
" (beschrijving like '" & strCriterium1 & "') and " & _
" (beschrijving like '" & strCriterium2 & "') and " & _
" (beschrijving like '" & strCriterium3 & "')"

MsgBox strQuerySQL

'Creer een recordset rstSelectie met alle ****
Set rstSelectie = Data1.Database.OpenRecordset("Select * from Blad1 where" & strQuerySQL)
MsgBox "Op basis van de zoekcriteria zijn er " & rstSelectie.RecordCount & " records geselecteerd"



Sign In or Register to comment.