Change query on combo box if it meets criteria

G

Guest

I have a continuous form with a combo box and hidden text box. The form also
uses a query to populate this form. The hidden text box is populated with
PointsPossible. The combo box uses a query as follows.

SELECT tblPointsValueDropdown.PointsValue
FROM tblPointsValueDropdown
GROUP BY tblPointsValueDropdown.PointsValue
HAVING (((tblPointsValueDropdown.PointsValue)<=[txtPointsPossible]))
ORDER BY tblPointsValueDropdown.PointsValue DESC;


However, I also have a check on this form to show whether this is a critical
item or not. If it is then I only want the combo box to be populated with
the value of the text box and 0 (it's like all or nothing). How could I go
about doing this? Any comments would be appreciated. Thanks in advance.
 
G

Guest

Never mind I created another query as follows and it seems to work. I
created a hidden textbox on the header and set the value to 0. Then if it is
critical have it change the record source. If anyone has a better solution
please let me know. Thanks....

SELECT tblPointsValueDropdown.PointsValue
FROM tblPointsValueDropdown
GROUP BY tblPointsValueDropdown.PointsValue
HAVING (((tblPointsValueDropdown.PointsValue)=[txtPointsPossible] Or
(tblPointsValueDropdown.PointsValue)=[txtCritValue]))
ORDER BY tblPointsValueDropdown.PointsValue DESC;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top