473,624 Members | 2,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A2003 problem with boolean showing as -1 in list

Just have a small problem with boolean fields in a list box showing as 0
and -1, not Yes/No or True/False.

Is there any fix to this?
--
Jeff
"More Access Stuff."
http://www.asken.com.au
Apr 9 '08 #1
11 3194
On Wed, 9 Apr 2008 12:52:02 +1000, "JeffP" <no******@asken .com.au>
wrote:

Yes; it's usually a matter of formatting, or of converting the values
in the underlying query.

select iif(SomeBoolean Field=0,'Nah', 'Yep')
from SomeTable

-Tom.

>Just have a small problem with boolean fields in a list box showing as 0
and -1, not Yes/No or True/False.

Is there any fix to this?
Apr 9 '08 #2
So it ignores the format setting for the field. Isn't that just helpful.
Thanks MS.

Jeff

"Tom van Stiphout" <no************ *@cox.netwrote in message
news:dn******** *************** *********@4ax.c om...
On Wed, 9 Apr 2008 12:52:02 +1000, "JeffP" <no******@asken .com.au>
wrote:

Yes; it's usually a matter of formatting, or of converting the values
in the underlying query.

select iif(SomeBoolean Field=0,'Nah', 'Yep')
from SomeTable

-Tom.

>>Just have a small problem with boolean fields in a list box showing as 0
and -1, not Yes/No or True/False.

Is there any fix to this?

Apr 9 '08 #3
On Wed, 9 Apr 2008 13:26:06 +1000, "JeffP" <no******@asken .com.au>
wrote:

Actually, at least in A2007, that's exactly how it works.
I just wanted to give you some workarounds.

-Tom.

>So it ignores the format setting for the field. Isn't that just helpful.
Thanks MS.

Jeff

"Tom van Stiphout" <no************ *@cox.netwrote in message
news:dn******* *************** **********@4ax. com...
>On Wed, 9 Apr 2008 12:52:02 +1000, "JeffP" <no******@asken .com.au>
wrote:

Yes; it's usually a matter of formatting, or of converting the values
in the underlying query.

select iif(SomeBoolean Field=0,'Nah', 'Yep')
from SomeTable

-Tom.

>>>Just have a small problem with boolean fields in a list box showing as 0
and -1, not Yes/No or True/False.

Is there any fix to this?
Apr 9 '08 #4
JeffP wrote:
So it ignores the format setting for the field. Isn't that just
helpful. Thanks MS.
A format *property* is always applied to the one level you set it at. It
does not propagate. As far as I know this has always been the case. It is
no different than expecting the font color you set in a query to be
inherited by a report that uses the query. Just doesn't work that way.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Apr 9 '08 #5
"JeffP" <no******@asken .com.auwrote in news:47fc374b$0 $13243$5a62ac22
@per-qv1-newsreader-01.iinet.net.au :
So it ignores the format setting for the field. Isn't that just helpful.
Thanks MS.

Jeff
There are format settings for a field? How quaint!
Apr 9 '08 #6
"Rick Brandt" <ri*********@ho tmail.comwrote in
news:LS******** ********@nlpi06 1.nbdc.sbc.com:
JeffP wrote:
>So it ignores the format setting for the field. Isn't that just
helpful. Thanks MS.

A format *property* is always applied to the one level you set it at.
It does not propagate. As far as I know this has always been the
case. It is no different than expecting the font color you set in a
query to be inherited by a report that uses the query. Just doesn't
work that way.
I'm learning a lot in this group.

You can set font color in a query? I never knew that. Wow!

Another question: Why would anyone want to set font color in a query?

Would anyone actually do it?

Would these be the same people shave with rusty axes?

(Sorry, that's three questions.)
Apr 9 '08 #7
On Wed, 09 Apr 2008 12:52:02 +1000, JeffP wrote:
Just have a small problem with boolean fields in a list box showing as 0
and -1, not Yes/No or True/False.
Is there any fix to this?
That is the nature of boolean, falsies are always a zero, and the truth
always seems negative.

As for a fix, manually set the values in the list box. If all you are
using for is Yes/No or True/False then enter the text and give it an
integer value of 1 or 0. You need not bind it to the database.
If you bind it to the database, then you should change your field from
boolean (yes/no) to integer. (You could use Character or Byte but that
causes problems with casting)

If you want a 0 or 1 return, have:
value=ListBoxNa me.Value * -1
(or is it ListBoxName * -1, I guess that depends on the version of VB and
Access)

---
Harry Skelton
sk***********@g mail.com
Jun 27 '08 #8
This is a list box, not a checkbox, used for displaying data from a table.
The users have already entered the data on a form using a checkbox.

The listbox is just being used to display a set of data from that table. All
I want the list box to do is show either 'Yes' or 'No' for that column which
is from a boolean field, just as they used to do in A2000.

"Harry Skelton" <sk***********@ gmail.comwrote in message
news:48******** *************** @read.cnntp.org ...
On Wed, 09 Apr 2008 12:52:02 +1000, JeffP wrote:
>Just have a small problem with boolean fields in a list box showing as 0
and -1, not Yes/No or True/False.
Is there any fix to this?

That is the nature of boolean, falsies are always a zero, and the truth
always seems negative.

As for a fix, manually set the values in the list box. If all you are
using for is Yes/No or True/False then enter the text and give it an
integer value of 1 or 0. You need not bind it to the database.
If you bind it to the database, then you should change your field from
boolean (yes/no) to integer. (You could use Character or Byte but that
causes problems with casting)

If you want a 0 or 1 return, have:
value=ListBoxNa me.Value * -1
(or is it ListBoxName * -1, I guess that depends on the version of VB and
Access)

---
Harry Skelton
sk***********@g mail.com

Jun 27 '08 #9
Hi David

I have used 2000 for years and in 2000 a boolean field displayed in a list
box always displayed as 'Yes' or 'No' when the field format was set that
way.

Just don't understand why have they changed it so it now ignores the
specified format and displays the raw data as in 0 or -1.

The reason this is disappointing is that I converted a 2000 database to 2003
and users are saying, quite rightly, what does -1 mean. They are used to the
more friendly Yes/No which they saw in 2000. So I now have to go through all
areas where there are list boxes and see where I have to change the query or
sql statement behind them to include a Format statement to show Yes or No.

Are you saying that dates are the same as I haven't noticed them yet?

Jeff

"David W. Fenton" <XX*******@dfen ton.com.invalid wrote in message
news:Xn******** *************** ***********@64. 209.0.89...
"JeffP" <no******@asken .com.auwrote in
news:47******** *************** @per-qv1-newsreader-01.iinet.net.au :
>This means that in all listboxes in the app I have to visit the
sql and use the Format function. I wondered where else this
approach happens?

Aargh.

Do you know if this is a bug or by design?

You think listboxes are loopy in Access? You should try them in any
other environment. You should be happy with all the help you get.

Put another way: this is a remnant of the long evolution of the
Access controls from early Visual Basic controls. There are similar
issues with formatting dates, for instance.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1607
by: Tim Marshall | last post by:
I'm having a vexing problem with using filecopy and compactdatabase on a Jet back end I'm sure I did not have with A97. It seems to me that A2003 is much slower in shutting down the back end ldb than A97 and the code below (for compactdatabase) gets caught and throws an error related to the BE still being open. I would really appreciate any suggestions. I first ran into this with FileCopy and settled on a warning to close all forms...
20
2865
by: Jason Dravet | last post by:
Some time ago I wrote an application that controls the projectors in our classrooms(turn on, turn off, and volume control). This application is written in VB.net 2003. It was working perfectly until XP SP2 was installed on the PCs. Now when the power on or power off button is pressed the following message is displayed: An unhandled exception has occurred in your application. If you click Continue, the application will ignore this...
2
2433
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just fine. However, when attempting to assing default values as designtime in the propertygrid, nothing is working on the class object. I know that I am doing it wrong, any ideas what it is? Thanks in advance
5
1355
by: Dave G | last post by:
I have had a large application running in A97/W2000. The users usually have at least 2 instances of the same program open at once, and to start an new instance they simply click on the shortcut and another opens - simple, no problem, works well. Now I have converted them to A2003/XP and there is a problem. They cannot create a new instance by clicking on the shortcut. All that happens is that if the existing instance is minimized, then...
17
3133
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 - Access 2000; folder with back-ends for both computers and 'Update' folder. I have a launcher program that launces my application (MyApp). The launcher program also checks for updates to MyApp located in 'Update' folder (on
1
2090
by: fiaolle | last post by:
Hi The first set of source code is the class for a combobox in a grid, hopefully. In the second set of code we try to use the combobox class, but the grid is empty. I don't understand how this works. The first set of code I downloaded from internet and when i tried it, it worked fine. But when I changed the second part of the code it started to give me trouble. Before I changed the code they used Datacolumns,Datarows and Datatables and...
6
2767
by: gerbski | last post by:
Hi all, I am relatively new to ADO, but up to now I got things working the way I wanted. But now I've run into somethng really annoying. I am working in MS Access. I am using an Access frontend separately from a backend. The tables from the backend database are linked in the frontend database. In the frontend there is a Form with a listbox in it. The listbox rowsource is a query that selects all the records from a (linked)
3
2593
by: Salad | last post by:
I am using A2003, SP3. If I use the QueryBuilder and select a table and drag the fields to it and then select Query/Append from the menu as the type of query, the first table name (alphabetically) never, ever shows up. I have to create a junk table..I may copy an existing table to a name like AAA...and then the second table in the alphabetical list will show up. Ex: If I have tables A, B, C, and D and I select table B and want to...
1
3533
by: Man4ish | last post by:
Hi, How Eventlistner can be used with rendred combo box. I got one example of combobox in table as follows . /* * Copyright (c) 1995 - 2008 Sun Microsystems, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.