I have 3 lists of values, containing day, month and year. There are 3 possiblities: choose day and month and year, choose month and year or choose nothing. How do I search in a table for the records? I put them in "Keuzelijst"
I've got this, but it doesn't work properly:
If ChcDay.Value <> "" Then
day = KzeDag.Value & "-"
Else: day = ""
End If
month = ChcMonth.Value & "-"
year = ChcYear.Value
date = day & month & year
Keuzelijst.RowSource = "select export2.id, export2.chauffeur, export2.kenteken, export2.schadenummer, export2.schadedatum, export2.klantnummer from export2 where " & date & " is export2.schadedatum"
I've got this, but it doesn't work properly:
If ChcDay.Value <> "" Then
day = KzeDag.Value & "-"
Else: day = ""
End If
month = ChcMonth.Value & "-"
year = ChcYear.Value
date = day & month & year
Keuzelijst.RowSource = "select export2.id, export2.chauffeur, export2.kenteken, export2.schadenummer, export2.schadedatum, export2.klantnummer from export2 where " & date & " is export2.schadedatum"