Solved

Yes No Field

Posted on 2011-03-01
8
262 Views
Last Modified: 2012-05-11
Experts,

I have  a true YN field (not text) in the table
I have a filter form with unbound text box (cboExpired)
this textbox is value list with "Yes";"No"
  but this does not work with text.
If I change it from "yes";"No" to -1,0 then it does work.
The user will not understand -1 or 0.  How can I associate -1 to "Yes" and 0 to "No"?

I seem to remember that you can put a sort of alias name in the row source similar to this:
"Yes";(-1);"No";(0)  .....but this is wrong.  
 

Thank you
0
Comment
Question by:pdvsa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35014107
how, where do you use the cboExpired as filter?

you can use the switch function for this

private sub cboExpired_afterupdate
dim blFilter as boolean

blFilter=iif(cboExpired="yes",-1,0)

me.filter="[YN]=" & blFilter
me.filteron=true
end sub

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35014112
how, where do you use the cboExpired as filter?

you can use the switch function for this OR

private sub cboExpired_afterupdate
dim blFilter as boolean

blFilter=iif(cboExpired="yes",-1,0)

me.filter="[YN]=" & blFilter
me.filteron=true
end sub

0
 

Author Comment

by:pdvsa
ID: 35014186
Cap: I use a form with a few different unbound fields and press report button.  One of those fields is named cboExpired with row source "Yes";"No".  

please see attached.  

I copied the afterupdate code but when I ran the report it said "too complex", which was teh same msg I received when operating as if text.  I dont receive this msg if I place 0 or -1 in the qry under report.

What do you think now?  
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:pdvsa
ID: 35014190
screenprintYN
0
 

Author Comment

by:pdvsa
ID: 35014196
oops...it did not save....disregard that screen print.
0
 

Author Comment

by:pdvsa
ID: 35014202
here it is...
untitled.JPG
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 35014217
try using this rowsource

-1;Yes;0;No

and set the following properties
column count 2
bound column 1
column widths 0
0
 

Author Comment

by:pdvsa
ID: 35014247
beautiful....that worked.  thanks again...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question