I have 5 parameters - called 1,2,3,4, and 5 - that match to 5 fields in a table.
I want to return all records where
parameter 1 = field 1 and
paramter 2 = field 2 and
paramter 3 = field 3 and
paramter 4 = field 4 and
paramter 5 = field 5.
The problem is all 5 parameters may not be populated at any one time. The user could populate any combination of the parameters. So if one of the parameters is null I would want to ignore that part of the where clause.
So if a user enters
p_1 = ABC
p_2 = DEF
and p_3 = HJI, I need to find all records containing these values
but if a user enters
p_1 = XKL
p_2 = OOK
p_3 = RRJ
and p_5 = MON, I need to find all records containing these values.
Either this is super easy and I'm missing the boat or this is harder than I thought (maybe impossible?).
BTW, I'm trying to do this in Access.
Please help!
Kelly
I want to return all records where
parameter 1 = field 1 and
paramter 2 = field 2 and
paramter 3 = field 3 and
paramter 4 = field 4 and
paramter 5 = field 5.
The problem is all 5 parameters may not be populated at any one time. The user could populate any combination of the parameters. So if one of the parameters is null I would want to ignore that part of the where clause.
So if a user enters
p_1 = ABC
p_2 = DEF
and p_3 = HJI, I need to find all records containing these values
but if a user enters
p_1 = XKL
p_2 = OOK
p_3 = RRJ
and p_5 = MON, I need to find all records containing these values.
Either this is super easy and I'm missing the boat or this is harder than I thought (maybe impossible?).
BTW, I'm trying to do this in Access.
Please help!
Kelly