G
Guest
Hello,
I read through some of the messages here and got lost. I current have a form
that pulls up data from a table based on a select query. I would like to add
on option group so the user can choose to view records with the status of
"open" or "closed" based on the currently selected option button.
I can't figure out how to write the sql statement to translate the default
value of the option group ( 1 or 2 ) in order to use that in the query to
find the status of open or closed and then return that to the select query so
it shows only the records "requested".
I thought this would work:
SELECT Issuestable.[Staff ID], Issuestable.Date, Issuestable.Status,
Issuestable.Note
FROM Issuestable
WHERE
(IF form![open issues for all staff].open = "1"
then Issuestable.Status="open"
Else
Issuestable.Status="closed"
ENDIF);
Kelly
I read through some of the messages here and got lost. I current have a form
that pulls up data from a table based on a select query. I would like to add
on option group so the user can choose to view records with the status of
"open" or "closed" based on the currently selected option button.
I can't figure out how to write the sql statement to translate the default
value of the option group ( 1 or 2 ) in order to use that in the query to
find the status of open or closed and then return that to the select query so
it shows only the records "requested".
I thought this would work:
SELECT Issuestable.[Staff ID], Issuestable.Date, Issuestable.Status,
Issuestable.Note
FROM Issuestable
WHERE
(IF form![open issues for all staff].open = "1"
then Issuestable.Status="open"
Else
Issuestable.Status="closed"
ENDIF);
Kelly