How to give the parameter value Yes or No? (1 Viewer)

JithuAccess

Member
Local time
Today, 11:22
Joined
Mar 3, 2020
Messages
297
Hello,

I was trying to create a query based on the parameters a user enter. I have created a user form and when user select "Yes" I want to display all the records which are completed. The field Completed is a Check Box.

In the Query design view when I enter Yes (without double quotes) query returns me all the completed records but when I am getting error when I try to give this code in the criteria

Code:
[Forms]![frmQueryParametersInputForm]![Combo29]

This is the error I am getting.

1652720390021.png


Could you please let me know how to fix this?

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:22
Joined
Oct 29, 2018
Messages
21,358
Make sure the value in the combobox is either 0 or -1. You can use a two-column row source for that.
 

June7

AWF VIP
Local time
Today, 09:22
Joined
Mar 9, 2014
Messages
5,423
Is Combo29 UNBOUND? What is its RowSource?
 

June7

AWF VIP
Local time
Today, 09:22
Joined
Mar 9, 2014
Messages
5,423
AS Guy suggested, set up combobox with 2 columns.
-1;Yes;0;No

ColumnCount: 2
ColumnWidths: 0";0.25"

Advise give controls more meaningful names.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:22
Joined
Feb 19, 2002
Messages
42,971
Also,
Don't be sloppy with your control names. ALWAYS give a control a rational, meaningful name. NEVER just accept the default like Combo29. No one who looks at that will have any idea what it is all about and neither will you next month.
 

Users who are viewing this thread

Top Bottom