Listbox display 0/-1 r/t Yes/No

R

Robin

I created a listbox which contains a Yes/No field in A2002. When opened in
A2003 (where it will ultimately be used) it displays -1 or 0. How do I
correct this?

Thanks for any help!
Robin
 
R

Rob Parker

Hi Robin,

A simple method, which worked for me, is to set the format for the field to
Yes/No in the underlying table or in a saved query which is used as the
recordsource of the listbox. I also found that changing the format in the
query design grid showing the recordsource of the listbox (where the
recordsource is an SQL statement) had no effect.

HTH,

Rob
 
R

Rick Brandt

I created a listbox which contains a Yes/No field in A2002. When opened
in A2003 (where it will ultimately be used) it displays -1 or 0. How do
I correct this?

Thanks for any help!
Robin

Change the query for the Listbox RowSource to display "Yes/No", "True/
False" or whatever Text you want. You cannot display a Checkbox inside a
Listbox if that is what you were after.

AliasName: IIf([FieldName], "Yes", "No")
 
R

Robin

Thank you Rob & Rick,

I wrote that from work today and unfortunately cannot test either solution
at home where I only have A2002. I'll try both solutions when I go back to
the office Monday and update this posting with the result.

Rob - I did check the format of the underlying field in the table (in A2002)
and it is set to Yes/No but perhaps that is not coming through in A2003.
I'll check when I'm back on A2003.

Rick - I'm not try to show a check box. The quandry was that it shows Yes
or No in the listbox in A2002 but -1 or 0 in A2003. Rob stated above that
changing the format in the query had no effect but I'll check when I'm back
on the office computer.

Thanks to the both of you...I'll update later.
Robin
 

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