473,785 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display checkboxes in Query for boolean

Have a query that is arregated into crosstab query, it is working
correctly.

select Yes as selected from tblname
or
select true as selected from tblname

Produces -1 ( vba value of True) in the results pane I would like to
see it produce a checkbox with tick in just like I would see if I
displayed a boolean/yes/no field from a table.

Any idea how to force this?
Jun 27 '08 #1
4 13722
On Apr 16, 9:57*pm, Yitzak <terrysha...@ya hoo.co.ukwrote:
Have a query that is arregated into crosstab query, it is working
correctly.

select Yes as selected from tblname
or
select true as selected from tblname

Produces -1 ( vba value of True) in the results pane I would like to
see it produce a checkbox with tick in just like I would see if I
displayed a boolean/yes/no field from a table.

Any idea how to force this?
Queries and Tables are for data. Forms and Reports are for editing and
displaying data. It angers the Database Gods when you mix the two and,
sooner or later, they will punish you by corrupting the database,
returning false values, or precipitating a crash. Use a form or
report. Only the developmentally handicapped and rank amateurs edit or
display queries or tables directly (Well, there are some of those
Microsoft people, too). Oops, sorry for repeating myself.
Jun 27 '08 #2
On 17 Apr, 03:19, lyle fairfield <lyle.fairfi... @gmail.comwrote :
On Apr 16, 9:57 pm, Yitzak <terrysha...@ya hoo.co.ukwrote:
Have a query that is arregated into crosstab query, it is working
correctly.
select Yes as selected from tblname
or
select true as selected from tblname
Produces -1 ( vba value of True) in the results pane I would like to
see it produce a checkbox with tick in just like I would see if I
displayed a boolean/yes/no field from a table.
Any idea how to force this?

Queries and Tables are for data. Forms and Reports are for editing and
displaying data. It angers the Database Gods when you mix the two and,
sooner or later, they will punish you by corrupting the database,
returning false values, or precipitating a crash. Use a form or
report. Only the developmentally handicapped and rank amateurs edit or
display queries or tables directly (Well, there are some of those
Microsoft people, too). Oops, sorry for repeating myself.
No way to do this then?

There are no access forms or reports at all in this project. The front-
end is in VB

e.g.

tblShop
ShopID Paid
1 yes
2 no

tblshopServices
ShopID SvcID
1 100
1 101
2 100

tblServices
SvcID Desc.
100 Internet
101 Phone
102 Post

So crosstab query (tblshopService s/tblServices) joining to tblShop

shopID Paid Internet Phone Post
1 Y Y Y N
2 N N Y N

The problem is only Paid field appears as a checkbox, Internet/Phone
will appear as vbFalse/True 0/-1.
Say I got it to display a checkbox for the Internet field - checking
it un-checking it could do nothing as it would have to delete or add a
row to tblshopServices . Maybe thats why it doesn't do this?

Just a pain because people write ad-hoc queries and I did this cross-
tab so they could use it in other queries to show in ONE ROW rather
than many which of the standard services each shop offers. The results
of these queries are exported/pasted into Excel and would make it more
standard if all fields in the query looked like the real field "Paid"
BTW - impressed with the crosstab feature in Access better than other
DB's I've used.
Jun 27 '08 #3
On Apr 16, 8:42*pm, Yitzak <terrysha...@ya hoo.co.ukwrote:
On 17 Apr, 03:19, lyle fairfield <lyle.fairfi... @gmail.comwrote :


On Apr 16, 9:57 pm, Yitzak <terrysha...@ya hoo.co.ukwrote:
Have a query that is arregated into crosstab query, it is working
correctly.
select Yes as selected from tblname
or
select true as selected from tblname
Produces -1 ( vba value of True) in the results pane I would like to
see it produce a checkbox with tick in just like I would see if I
displayed a boolean/yes/no field from a table.
Any idea how to force this?
Queries and Tables are for data. Forms and Reports are for editing and
displaying data. It angers the Database Gods when you mix the two and,
sooner or later, they will punish you by corrupting the database,
returning false values, or precipitating a crash. Use a form or
report. Only the developmentally handicapped and rank amateurs edit or
display queries or tables directly (Well, there are some of those
Microsoft people, too). Oops, sorry for repeating myself.

No way to do this then?

There are no access forms or reports at all in this project. The front-
end is in VB

e.g.

tblShop
ShopID * * * *Paid
1 * * * * * * * * yes
2 * * * * * * * * no

tblshopServices
ShopID * * * *SvcID
1 * * * * * * * * 100
1 * * * * * * * * 101
2 * * * * * * * * 100

tblServices
SvcID * * * * *Desc.
100 * * * * * * Internet
101 * * * * * * Phone
102 * * * * * * Post

So crosstab query (tblshopService s/tblServices) joining to tblShop

shopID * * * * Paid * * * * Internet * * * * Phone* * * Post
1 * * * * * * * * Y * * * * * * *Y * * * * * * * * *Y * * * * * * N
2 * * * * * * * * N * * * * * * *N * * * * * * * * Y * * * * * * *N

The problem is only Paid field appears as a checkbox, Internet/Phone
will appear as vbFalse/True 0/-1.
Say I got it to display a checkbox for the Internet field - checking
it un-checking it could do nothing as it would have to delete or add a
row to tblshopServices . Maybe thats why it doesn't do this?

Just a pain because people write ad-hoc queries and I did this cross-
tab so they could use it in other queries to show in ONE ROW rather
than many which of the standard services each shop offers. The results
of these queries are exported/pasted into Excel and would make it more
standard if all fields in the query looked like the real field "Paid"

BTW - impressed with the crosstab feature in Access better than other
DB's I've used.- Hide quoted text -

- Show quoted text -
open the query
right click anywhere and select properties
from the list of fields that make up the query, hilight the whole
'internet' column
choose the lookup table of the 'field properties'
select checkbox as the display control
Jun 27 '08 #4

Actually, -1 <"True". -1 means that the value isn't false. A
nit-picky point to be sure, but in the Microsoft world it often helps
to remember that booleans are best stated as "Whatever isn't False (0)
is "True". Or in other words, 0=false, *anything* else is "true".

As for your display issue, it would be best to have the results show
up as a continuous form. From there, you can format the results to
whatever your needs are.

Either way, form or query, remember that the results won't be
editable. However, if you use a form, you can trap the change event
and have the form issue an update query, then re-run the query so your
user can see the result of the change.

On Wed, 16 Apr 2008 18:57:46 -0700 (PDT), Yitzak
<te*********@ya hoo.co.ukwrote:
>Have a query that is arregated into crosstab query, it is working
correctly.

select Yes as selected from tblname
or
select true as selected from tblname

Produces -1 ( vba value of True) in the results pane I would like to
see it produce a checkbox with tick in just like I would see if I
displayed a boolean/yes/no field from a table.

Any idea how to force this?
--
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!
Jun 27 '08 #5

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

Similar topics

2
1570
by: ken | last post by:
I am using the query bellow to display some fielsd on my page and am having some problema displaying the data from calltime. I have the field setup in access as short time but when it is displayed on the page it displays as 12:15 AM. How can I remove the AM/PM from the display? Thanks Ken <% notesSQL = "Select * From notes where callID =" &RSupdate("callID") Set RScalls = dbConnection.Execute(notesSQL)
1
2074
by: Yisroel Markov | last post by:
Greetings, In Access 97 I have a subreport with two labels and a control. The record source for the control is a simple SQL query referring to another query: SELECT DISTINCTROW qryInitPositions.PortfolioNum, qryInitPositions. FROM qryInitPositions;
2
1894
by: Not Me | last post by:
Hi, I have a table with a currency field, which is displayed via a form. If I open a query which displays this field (using the forms!myform.field notation) that field displays as though it's corrupt (symbols and the like) Any ideas why this is the case? Cheers, Chris
0
894
by: dbuchanan | last post by:
Hello, Is it possible to display a union query in a datagrid? If so how? If not what alternatives do I have? What I am trying to do...
2
21059
by: Jerry M. Gartner | last post by:
Greetings: As evident from a previous post, I am a php noob. I would like to display MySQL query results in an html table with one of the row values as a category and the rest of the data displayed under the relevant category. I can get as far as displaying the data in a nice readable format but I don't know how to have the records placed under their corresponding category. This is my code thus far (sans the html output):
3
12368
by: Lucky | last post by:
hi guys, it's me again. now days i'm learning DataGridView of .NET 2.0. i found that some of the features are quite attractive but sometimes they are not easy to modify and from that point our problem starts. i've one bit column in my table in SQL SERVER 2000 Database. the DataGridView displays it as "True" or "False". what i want to do is, i want to make it display "Yes" or "No" instead. i don't know what to do. As this is my first...
3
4833
by: DigitalWallfare | last post by:
Hi all, This is my first post here, but i've lurked for a while. I'm working on a website but have come across a major stumbling block in the code: I've managed to structure the search query but have 2 problems: I dont know how to code the results into the table, and make the table repeat itself 5 times per page (and recognise it needs a new page)
2
1969
by: pizzaface | last post by:
I have created a table driven email notification system which sends emails using outlook to employees depending on if a boolean field (blnEmail) in the email notification table is set to TRUE. I'm wanting to create a tabbed panel with a control that displays all records in the email notification table so that managers can check/uncheck the boolean field (blnEmail) depending on whether an employee should receive email notifications. I'm not...
4
2734
by: Charles Ndethi | last post by:
Hi, I want to query the table below as to return the titles of the column where the intersection of SessionId and Roomx is 0.The type of the Room is TINYINT - which in mysql represents BOOLEAN Below is the table: SessionId Room1 Room2 Room3 1 0 1 0 2 1 0 1
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10327
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9950
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
8973
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
7499
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
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
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
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3647
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.