• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Yes No Field

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
pdvsa
Asked:
pdvsa
  • 5
  • 3
1 Solution
 
Rey Obrero (Capricorn1)Commented:
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
 
Rey Obrero (Capricorn1)Commented:
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
 
pdvsaProject financeAuthor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
pdvsaProject financeAuthor Commented:
screenprintYN
0
 
pdvsaProject financeAuthor Commented:
oops...it did not save....disregard that screen print.
0
 
pdvsaProject financeAuthor Commented:
here it is...
untitled.JPG
0
 
Rey Obrero (Capricorn1)Commented:
try using this rowsource

-1;Yes;0;No

and set the following properties
column count 2
bound column 1
column widths 0
0
 
pdvsaProject financeAuthor Commented:
beautiful....that worked.  thanks again...
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now