SEARCH WITH ( YES OR NO ) DATA TYPE (1 Viewer)

Safari

Member
Local time
Today, 11:01
Joined
Jun 14, 2021
Messages
95
HI ALL

HOW CAN I MAKE SEARCH QUERY FOR 2 FILDES ( YES OR NO )

I WANT WHEN I CHOOSE 1 OF THEN GET THE RESULT FOR 1
WHEN I CHOOSE ONE THE 2 FILDES TOGETHER I GET NEW RESULT FOR BOTH

I TRIED BUT NOT WORKING

PLEASE HELP
 

Attachments

  • Query.accdb
    1,020 KB · Views: 233

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:01
Joined
May 7, 2009
Messages
19,234
see your query and the code on Tahseel and Mortad (checkboxes).
I translate tahsel and it is collection.
Mortad, i dont know.
But on your table records, i only see either 1 but not both.
 

Attachments

  • Query (1).accdb
    516 KB · Views: 248
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:01
Joined
Feb 19, 2002
Messages
43,263
The example posted in your OTHER thread showed how to do it. Did you try that example?

Where (Somefield = Forms!yourform!yourcbo OR Forms!yourform!yourcbo Is Null)

If there is a value selected, Somefield must be = that value OR if the form field is null, then the record is selected. So - pick yes, no, or NOTHING. If you pick yes/no the value must match. If you pick nothing, then that part of the condition will be true. and so it doesn't matter if Somefield is equal to the selection.
 

Eugene-LS

Registered User.
Local time
Today, 12:01
Joined
Dec 7, 2018
Messages
481
I WANT WHEN I CHOOSE 1 OF THEN GET THE RESULT FOR 1
WHEN I CHOOSE ONE THE 2 FILDS TOGETHER I GET ...
One more example for you:
 

Attachments

  • Query_v02.zip
    52.7 KB · Views: 240
  • Query_v02_Screenshot 2022-03-05 220346.png
    Query_v02_Screenshot 2022-03-05 220346.png
    92.7 KB · Views: 243

Eugene-LS

Registered User.
Local time
Today, 12:01
Joined
Dec 7, 2018
Messages
481
its amazing thank you very much
I am glad that you liked it, if there is something unclear in the example, please contact me.
 

Attachments

  • Click the Like button v001_380.png
    Click the Like button v001_380.png
    14.8 KB · Views: 235

Safari

Member
Local time
Today, 11:01
Joined
Jun 14, 2021
Messages
95
see your query and the code on Tahseel and Mortad (checkboxes).
I translate tahsel and it is collection.
Mortad, i dont know.
But on your table records, i only see either 1 but not both.
thank you very much
 

Users who are viewing this thread

Top Bottom