When I made my list box (selector to find client data) my yes and no values show -1 and 0 not yes and no. Am I missing something?
5 1801 FishVal 2,653
Recognized Expert Specialist
Hi, Collins.
-1 and 0 are actually the values stored in database representing boolean values True and False respectively (or Yes and No as you like).
I would like to suggest you to replace that Y/N field in your query - RowSource for your ListBox, with a computation based on that field.
Something like this. -
SELECT ......, IIf(blnYesNoField, 'Yes', 'No') AS txtYesNoField FROM ....
-
Regards,
Fish
Hi, Collins.
-1 and 0 are actually the values stored in database representing boolean values True and False respectively (or Yes and No as you like).
I would like to suggest you to replace that Y/N field in your query - RowSource for your ListBox, with a computation based on that field.
Something like this. -
SELECT ......, IIf(blnYesNoField, 'Yes', 'No') AS txtYesNoField FROM ....
-
Regards,
Fish
Right now I have the RowSource set as qryActive where it pulls the Client name, Active and Employment consultant. I guess I am not sure where to add this -
SELECT tblClient.ID AS tblClient_ID, tblClient.LastName AS tblClient_LastName, tblClient.FirstName AS tblClient_FirstName, tblClient.Active, tblStaff.ID AS tblStaff_ID, tblStaff.LastName AS tblStaff_LastName, tblStaff.FirstName AS tblStaff_FirstName, tblClient.EmploymentConsultant
-
FROM tblStaff INNER JOIN tblClient ON tblStaff.ID=tblClient.EmploymentConsultant
-
WHERE (((tblClient.Active)=True))
-
ORDER BY tblClient.LastName;
-
FishVal 2,653
Recognized Expert Specialist
Right now I have the RowSource set as qryActive where it pulls the Client name, Active and Employment consultant. I guess I am not sure where to add this -
SELECT tblClient.ID AS tblClient_ID, tblClient.LastName AS tblClient_LastName, tblClient.FirstName AS tblClient_FirstName, tblClient.Active, tblStaff.ID AS tblStaff_ID, tblStaff.LastName AS tblStaff_LastName, tblStaff.FirstName AS tblStaff_FirstName, tblClient.EmploymentConsultant
-
FROM tblStaff INNER JOIN tblClient ON tblStaff.ID=tblClient.EmploymentConsultant
-
WHERE (((tblClient.Active)=True))
-
ORDER BY tblClient.LastName;
-
Ok.
I guess the field mentioned is tblClient.Active.
So make the following changes to the query. -
SELECT tblClient.ID AS tblClient_ID, tblClient.LastName AS tblClient_LastName, tblClient.FirstName AS tblClient_FirstName,
-
IIf(tblClient.Active, 'Yes', 'No') AS txtIsClientActive,
-
tblStaff.ID AS tblStaff_ID, tblStaff.LastName AS tblStaff_LastName, tblStaff.FirstName AS tblStaff_FirstName, tblClient.EmploymentConsultant
-
FROM tblStaff INNER JOIN tblClient ON tblStaff.ID=tblClient.EmploymentConsultant
-
WHERE (((tblClient.Active)=True))
-
ORDER BY tblClient.LastName;
-
Though right now i don't see what you are trying to represent in your listbox as long as all fetched records will have tblClient.Active=True.
Though right now i don't see what you are trying to represent in your listbox as long as all fetched records will have tblClient.Active=True.[/quote]
That worked great. Thank you. I need the data people to be able to see who is active and who is not. They have a checkbox that limits to active or expands to all. Yes and No work better than -1 and 0.
FishVal 2,653
Recognized Expert Specialist
You are welcome.
Best regards,
Fish
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Daniel Hill |
last post by:
OK, I have very, VERY basic background knowledge of VB6
and have now upgraded to VB.NET and now I'm struggling to
bring up the forms I want.
What I am looking to do is to have a click a command...
|
by: dmiller23462 |
last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript
but my end result is I need two text boxes to stay hidden until a
particular option is selected....I've cobbled together the...
|
by: John Kreps |
last post by:
(acc 2002)
I've got six unbound text boxes on a subform that has a white
background. Each of those six boxes has an expression that when true,
will change its background from white to another...
|
by: Jim Irvine |
last post by:
I have a small database made up of 2 tables. I have a report that is
driven from a query. On the report are a couple of fields linked to
memo boxes in the table. Everytime I run the report I get...
|
by: Siv |
last post by:
Hi,
I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
| |
by: ljungers |
last post by:
Have Form-1 with 3 text boxes and 1 command button. With any of the 3 boxes filled out and button is clicked, a Macro is performed that Opens a Query that has a WHERE clause that uses the 3 test...
|
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= |
last post by:
Hi,
I am wondering why the .NET Framework is quite different from Win32 API when
it comes to displaying system modal message boxes.
Consider the four following types of system modal message...
|
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= |
last post by:
I have an app that displays about 20 items of data in text boxes. Very
occasionally I need to allow these to be used for data entry, but the bulk of
the time they are solely for information. They...
|
by: ckpoll2 |
last post by:
Ok, so I'm wondering if what I need to do is even possible because I haven't been able to figure out how to do it and I haven't seen any similar posts on here.
In a table, I have a series of...
|
by: Lnwolf |
last post by:
Hello, I am having an issue with my synchronized combo boxes and don't know how to fix it.
I have created two boxes and have made the synchronization work (the user clicks on the first box and...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |