Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

Yes/No Field in Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tegan - 27 Feb 2007 14:46 GMT
Why is it that my "Yes/No" field is showing up as 0 and -1 in my form?  
Any way that I can change it?
Thanks!

-Tegan
Jeff Boyce - 27 Feb 2007 14:57 GMT
Tegan

If you allow Access to determine the control type, it will use a textbox
when you add the field to the form.  If you pick the checkbox and the field,
you can display a checkbox.

Access stores Yes/No field data as 0 (No) and -1 (Yes).

Signature

Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

> Why is it that my "Yes/No" field is showing up as 0 and -1 in my form?
> Any way that I can change it?
> Thanks!
>
> -Tegan
Tegan - 27 Feb 2007 15:00 GMT
Is there any way that I can get it to display Yes and No?

> Tegan
>
[quoted text clipped - 9 lines]
> >
> > -Tegan
storrboy - 27 Feb 2007 15:24 GMT
> Is there any way that I can get it to display Yes and No?
>
[quoted text clipped - 24 lines]
>
> > > -Tegan

Set the Format property for the textbox to "Yes/No"
Tegan - 27 Feb 2007 15:38 GMT
It is set to yes/no.
Should the display control be changed?  It is currently set to text box.  
Should it be a combo box?

> Set the Format property for the textbox to "Yes/No"
storrboy - 27 Feb 2007 16:23 GMT
> It is set to yes/no.
> Should the display control be changed?  It is currently set to text box.
> Should it be a combo box?
>
> > Set the Format property for the textbox to "Yes/No"

I'm not sure why it's not displaying Yes/No. I've tried multiple
methods of setting the textbox value and it always works.
You're not talking about the table field being a Yes/No are you? The
textbox on the form needs to be set this way as well.
Ken Sheridan - 27 Feb 2007 18:22 GMT
Changing the Format property of the field in table design won't change it for
any existing controls on a form bound to the field.  You'll need to change
the Format property of the Control on the form too.

If you want to show Yes or No as the value then using a combo box is a good
option. Change the control bound to the field on the form to a combo box; set
its RowSourceType property to Value List and set its RowSource property to
Yes;No.  You'll still need to set the Format property as well.

You might also consider using a check box as the control on the form; it
will be checked for TRUE (Yes) and unchecked for FALSE (No).

You can change the DisplayControl property in table design if you wish, but
as data should always be entered or viewed via forms there's not a lot of
point in doing so.

Ken Sheridan
Stafford, England

> It is set to yes/no.
> Should the display control be changed?  It is currently set to text box.  
> Should it be a combo box?
>
> > Set the Format property for the textbox to "Yes/No"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.