473,765 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Evaluating a group of combo boxes

I want to look at the values of six combo boxes. If any of the boxes
are not null, I want to change the value of a separate text box. How
can I look at all of them at once?

Thanks in advance.

Troy Lee
Aug 24 '08 #1
8 1832
tr******@comcas t.net wrote in
news:b64d1c3b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.googl egroups.com:
I want to look at the values of six combo boxes. If any of the
boxes are not null, I want to change the value of a separate text
box. How can I look at all of them at once?

Thanks in advance.

Troy Lee
If you wish to look at them at once, you open your eyes. :-)

If you wish to evaluate their contents using Visual basic in the
forms code module, you would put code in the event that is triggered
when you wish to evaluate them. you could simply set a variable
bAll_Are_Null = (len("" & me.combo1 & me.combo2 & me.combo3 ....)=0)

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 24 '08 #2
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:b64d1c3b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.googl egroups.com:
I want to look at the values of six combo boxes. If any of the
boxes are not null, I want to change the value of a separate text
box. How can I look at all of them at once?
Thanks in advance.
Troy Lee

If you wish to look at them at once, you open your eyes. :-)

If you wish to evaluate their contents using Visual basic in the
forms code module, you would put code in the event that is triggered
when you wish to evaluate them. you could simply set a variable
bAll_Are_Null = (len("" & me.combo1 & me.combo2 & me.combo3 ....)=0)

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Thank you so much. I appreciate the humor. I am a n00b so some things
that are so painfully obvious to some are enigmas to me.

Troy Lee
Aug 24 '08 #3
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:b64d1c3b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.googl egroups.com:
I want to look at the values of six combo boxes. If any of the
boxes are not null, I want to change the value of a separate text
box. How can I look at all of them at once?
Thanks in advance.
Troy Lee

If you wish to look at them at once, you open your eyes. :-)

If you wish to evaluate their contents using Visual basic in the
forms code module, you would put code in the event that is triggered
when you wish to evaluate them. you could simply set a variable
bAll_Are_Null = (len("" & me.combo1 & me.combo2 & me.combo3 ....)=0)

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Bob,
This is what I tried. I put this code in the click event of my filter
button.

intAll_CBs_Are_ Null = (Len("" & Me.cboReceiveSt art & Me.cboReceiveEn d
& Me.cboQAStart & Me.cboQAEnd & Me.cboShipStart & Me.cboShipEnd) = 0)

If intAll_CBs_Are_ Null 0 Then
Me.cboRecordSou rce = "All Units"
End If

I'm not sure if I am doing this right. I can't get the combo box to
take on this new value "All Units". Any ideas? Am I using the variable
right?
Aug 24 '08 #4
tr******@comcas t.net wrote in
news:8da720b3-fcaf-4dbb-b88f-b5c0b80aa381
@k7g2000hsd.goo glegroups.com
:
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
>troy_...@comca st.net wrote in
news:b64d1c3 b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.goog legroups.com:
I want to look at the values of six combo boxes. If any of the
boxes are not null, I want to change the value of a separate
text box. How can I look at all of them at once?
Thanks in advance.
Troy Lee

If you wish to look at them at once, you open your eyes. :-)

If you wish to evaluate their contents using Visual basic in the
forms code module, you would put code in the event that is
triggered when you wish to evaluate them. you could simply set a
variable bAll_Are_Null = (len("" & me.combo1 & me.combo2 &
me.combo3 ....)=0)

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**

Bob,
This is what I tried. I put this code in the click event of my
filter button.

intAll_CBs_Are_ Null = (Len("" & Me.cboReceiveSt art &
Me.cboReceiveEn d & Me.cboQAStart & Me.cboQAEnd & Me.cboShipStart &
Me.cboShipEnd) = 0)

If intAll_CBs_Are_ Null 0 Then
Me.cboRecordSou rce = "All Units"
End If

I'm not sure if I am doing this right. I can't get the combo box
to take on this new value "All Units". Any ideas? Am I using the
variable right?
Not knowing your form, I need to ask if you have a combobos named
me.cborecordsou rce, or whether you really mean
Me.cboReceiveSt art.Recordsourc e = "All Units"
Me.cboReceiveEn d.Recordsource = "All Units"
me.....
through all the comboboxes.
--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 24 '08 #5
On Aug 24, 7:02 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:8da720b3-fcaf-4dbb-b88f-b5c0b80aa381
@k7g2000hsd.goo glegroups.com
:
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:b64d1c3b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.googl egroups.com:
I want to look at the values of six combo boxes. If any of the
boxes are not null, I want to change the value of a separate
text box. How can I look at all of them at once?
Thanks in advance.
Troy Lee
If you wish to look at them at once, you open your eyes. :-)
If you wish to evaluate their contents using Visual basic in the
forms code module, you would put code in the event that is
triggered when you wish to evaluate them. you could simply set a
variable bAll_Are_Null = (len("" & me.combo1 & me.combo2 &
me.combo3 ....)=0)
--
Bob Quintal
PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Bob,
This is what I tried. I put this code in the click event of my
filter button.
intAll_CBs_Are_ Null = (Len("" & Me.cboReceiveSt art &
Me.cboReceiveEn d & Me.cboQAStart & Me.cboQAEnd & Me.cboShipStart &
Me.cboShipEnd) = 0)
If intAll_CBs_Are_ Null 0 Then
Me.cboRecordSou rce = "All Units"
End If
I'm not sure if I am doing this right. I can't get the combo box
to take on this new value "All Units". Any ideas? Am I using the
variable right?

Not knowing your form, I need to ask if you have a combobos named
me.cborecordsou rce, or whether you really mean
Me.cboReceiveSt art.Recordsourc e = "All Units"
Me.cboReceiveEn d.Recordsource = "All Units"
me.....
through all the comboboxes.

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
No, I really have a combo box named cboRecordSource- probably not very
smart, huh?
Aug 25 '08 #6
tr******@comcas t.net wrote in
news:35b47971-6687-4178-a431-1efd73714d11
@e53g2000hsa.go oglegroups.co
m:
On Aug 24, 7:02 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
>troy_...@comca st.net wrote in
news:8da720b 3-fcaf-4dbb-b88f-b5c0b80aa381
@k7g2000hsd.go oglegroups.com
:
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comca st.net wrote in
news:b64d1c3 b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.goog legroups.com:
I want to look at the values of six combo boxes. If any of
the boxes are not null, I want to change the value of a
separate text box. How can I look at all of them at once?
Thanks in advance.
Troy Lee
>If you wish to look at them at once, you open your eyes. :-)
>If you wish to evaluate their contents using Visual basic in
the forms code module, you would put code in the event that is
triggered when you wish to evaluate them. you could simply set
a variable bAll_Are_Null = (len("" & me.combo1 & me.combo2 &
me.combo3 ....)=0)
>--
Bob Quintal
>PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Bob,
This is what I tried. I put this code in the click event of my
filter button.
intAll_CBs_Are_ Null = (Len("" & Me.cboReceiveSt art &
Me.cboReceiveEn d & Me.cboQAStart & Me.cboQAEnd &
Me.cboShipStart & Me.cboShipEnd) = 0)
If intAll_CBs_Are_ Null 0 Then
Me.cboRecordSou rce = "All Units"
End If
I'm not sure if I am doing this right. I can't get the combo
box to take on this new value "All Units". Any ideas? Am I
using the variable right?

Not knowing your form, I need to ask if you have a combobos named
me.cborecordso urce, or whether you really mean
Me.cboReceiveSt art.Recordsourc e = "All Units"
Me.cboReceiveEn d.Recordsource = "All Units"
me.....
through all the comboboxes.

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**

No, I really have a combo box named cboRecordSource- probably not
very smart, huh?
It's unusual, although it may be the smartest name for the box.
Because we cannot see your form, we need to guess sometimes.

Now when you set this combobox to "all Units", do you get an error
message? if yes, is the message immediate or does it only appear
when you try to save the record?

What is the rowSource of the this combo box, and what is its
recordsource? is limit to list set to yes?

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 25 '08 #7
On Aug 25, 6:00 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:35b47971-6687-4178-a431-1efd73714d11
@e53g2000hsa.go oglegroups.co
m:
On Aug 24, 7:02 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:8da720b3-fcaf-4dbb-b88f-b5c0b80aa381
@k7g2000hsd.goo glegroups.com
:
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comcas t.net wrote in
news:b64d1c3b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.googl egroups.com:
I want to look at the values of six combo boxes. If any of
the boxes are not null, I want to change the value of a
separate text box. How can I look at all of them at once?
Thanks in advance.
Troy Lee
If you wish to look at them at once, you open your eyes. :-)
If you wish to evaluate their contents using Visual basic in
the forms code module, you would put code in the event that is
triggered when you wish to evaluate them. you could simply set
a variable bAll_Are_Null = (len("" & me.combo1 & me.combo2 &
me.combo3 ....)=0)
--
Bob Quintal
PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Bob,
This is what I tried. I put this code in the click event of my
filter button.
intAll_CBs_Are_ Null = (Len("" & Me.cboReceiveSt art &
Me.cboReceiveEn d & Me.cboQAStart & Me.cboQAEnd &
Me.cboShipStart & Me.cboShipEnd) = 0)
If intAll_CBs_Are_ Null 0 Then
Me.cboRecordSou rce = "All Units"
End If
I'm not sure if I am doing this right. I can't get the combo
box to take on this new value "All Units". Any ideas? Am I
using the variable right?
Not knowing your form, I need to ask if you have a combobos named
me.cborecordsou rce, or whether you really mean
Me.cboReceiveSt art.Recordsourc e = "All Units"
Me.cboReceiveEn d.Recordsource = "All Units"
me.....
through all the comboboxes.
--
Bob Quintal
PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
No, I really have a combo box named cboRecordSource- probably not
very smart, huh?

It's unusual, although it may be the smartest name for the box.
Because we cannot see your form, we need to guess sometimes.

Now when you set this combobox to "all Units", do you get an error
message? if yes, is the message immediate or does it only appear
when you try to save the record?

What is the rowSource of the this combo box, and what is its
recordsource? is limit to list set to yes?

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Hey Bob,
Once again, thanks for the help.

I do not get error messages, the combo box just doesn't change. The
box is unbound and its row source is "All Unshipped Units";"All Units
Thru Final QA";"All Units".

I have 3 sets of 2 combo boxes that hold start and end dates. If any
of these boxes are filled in, 99.99% of the time the user wants to do
an historical search. The box cboRecordSource defaults to "All
Unshipped Units". These are active units.

I think you were leading me down the right road with the Len function.
I just didn't know how to apply it, or if I needed to delimit the
arguments included in the function with ## since these are date
values.

This is mostly to make it easy for the user, so they don't have to
manually change the cboRecordSource to "All Units" when I can
anticipate their need for an historical search.

Hope this clears it up. Thanks.

Troy Lee
Aug 25 '08 #8
tr******@comcas t.net wrote in
news:b0726a2c-f3b4-4993-b496-
e8**********@y3 8g2000hsy.googl egroups.co
m:
On Aug 25, 6:00 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
>troy_...@comca st.net wrote in
news:35b4797 1-6687-4178-a431-1efd73714d11
@e53g2000hsa.g ooglegroups.co
m:
On Aug 24, 7:02 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
troy_...@comca st.net wrote in
news:8da720b 3-fcaf-4dbb-b88f-b5c0b80aa381
@k7g2000hsd.go oglegroups.com
:
On Aug 24, 4:47 pm, Bob Quintal <rquin...@sPAmp atico.ca>
wrote:
troy_...@comca st.net wrote in
news:b64d1c3 b-7edf-43b8-a49a-35dac712cd5e@
2g2000hsn.goog legroups.com:
I want to look at the values of six combo boxes. If any
of the boxes are not null, I want to change the value of
a separate text box. How can I look at all of them at
once?
Thanks in advance.
Troy Lee
>If you wish to look at them at once, you open your eyes.
:-)
>If you wish to evaluate their contents using Visual basic
in the forms code module, you would put code in the event
that is triggered when you wish to evaluate them. you could
simply set a variable bAll_Are_Null = (len("" & me.combo1 &
me.combo2 & me.combo3 ....)=0)
>--
Bob Quintal
>PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
Bob,
This is what I tried. I put this code in the click event of
my filter button.
intAll_CBs_Are_ Null = (Len("" & Me.cboReceiveSt art &
Me.cboReceiveEn d & Me.cboQAStart & Me.cboQAEnd &
Me.cboShipStart & Me.cboShipEnd) = 0)
If intAll_CBs_Are_ Null 0 Then
Me.cboRecordSou rce = "All Units"
End If
I'm not sure if I am doing this right. I can't get the combo
box to take on this new value "All Units". Any ideas? Am I
using the variable right?
>Not knowing your form, I need to ask if you have a combobos
named me.cborecordsou rce, or whether you really mean
Me.cboReceiveSt art.Recordsourc e = "All Units"
Me.cboReceiveEn d.Recordsource = "All Units"
me.....
through all the comboboxes.
>--
Bob Quintal
>PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**
No, I really have a combo box named cboRecordSource- probably
not very smart, huh?

It's unusual, although it may be the smartest name for the box.
Because we cannot see your form, we need to guess sometimes.

Now when you set this combobox to "all Units", do you get an
error message? if yes, is the message immediate or does it only
appear when you try to save the record?

What is the rowSource of the this combo box, and what is its
recordsource ? is limit to list set to yes?

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.co m**

Hey Bob,
Once again, thanks for the help.

I do not get error messages, the combo box just doesn't change.
The box is unbound and its row source is "All Unshipped
Units";"All Units Thru Final QA";"All Units".

I have 3 sets of 2 combo boxes that hold start and end dates. If
any of these boxes are filled in, 99.99% of the time the user
wants to do an historical search. The box cboRecordSource defaults
to "All Unshipped Units". These are active units.

I think you were leading me down the right road with the Len
function. I just didn't know how to apply it, or if I needed to
delimit the arguments included in the function with ## since these
are date values.

This is mostly to make it easy for the user, so they don't have to
manually change the cboRecordSource to "All Units" when I can
anticipate their need for an historical search.

Hope this clears it up. Thanks.

Troy Lee
The box should change. Try a test with an If True then case, to see
if it does.

One reason it would not work is that the event containing the code
is not fired. Which event did you use?

The len() thing will work without the Date delimiters, because the
concatenation operation will automatically convert a non-blank date
into a string.

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 26 '08 #9

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

Similar topics

0
3537
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the form, I set the rowsources of its, and its subforms', combo boxes in the "Enter" events of the combo boxes. That's the standard trick for not loading the rowsource unless/until the user actually needs the combo box. For example:
2
1613
by: CSDunn | last post by:
Hello, In an Access 2000 ADP subform, I have a set of two Radio buttons in a single group that are bound to a field called 'Completed'. The Completed field comes from an SQL Server 2000 table, is of type Bit (so it takes 0 or 1). I need to set up a procedure so that when the radio button has a value of 1, a series of combo boxes in the Detail section of the subform have the Locked property set to Yes. If the value is zero, the Locked...
0
1603
by: Tom | last post by:
I have some very strange issues with combo boxes on a tab control. Here's the scenario: I have a Windows Forms form that has a tab control on it, with two (2) tabs. Tab 2 happens to have a number of text and combo boxes on it (in panels on the tab). These combos were originally simple drop down lists - i.e. you had to select from the list and couldn't enter anything of your own. At that time everything worked fine. Now, the users...
4
2361
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes: cboServer, cboPolicy, cboDB, and cboApplication. The idea behind the database is for a user to search/ select desired information in any kind of combination between the 4 combo boxes. Then the user clicks a button (btnSearch) and subsequently a query ("Search Function") is run that shows all 4...
6
3682
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
1
2908
by: Dave | last post by:
Hello all, First I'd like to apologize...This post was meant to be put in my previous post, but I tried many times without success to reply within my previous post. Now here goes... I have a main form (RD Form) with 4 combo boxes (i.e. cbo1, cbo2, etc) and a subdatasheet (the subform...let's call it subInfo) below the combo boxes on the RD Form. I hope this eliminates any confusion of the
2
3268
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once selecting from the combo box, I have all the combo boxes, using afterupdate, populating their respective list boxes. These text boxes are directly correlated to the combo box selection using SQL. Here is an example from the afterupdate event in the...
5
7739
by: zacks | last post by:
I am having a strange issue with an application written in .NET 2.0. Actually it is in VB.NET but I think my problem is not language specific, but a .NET Framework issue. On a form I have a Combo Box populated with two items. There are two Group Boxes on the form with different sets of controls in each. They both are the same size and are located at the same place. Which Group Box is visible depends on the item selected in the combo box....
2
3411
beacon
by: beacon | last post by:
Hi everybody, I have a form that has a combo box that asks the user to select the program they work on. Once the user selects the program, a SQL statement populates the row source for 4 staff member combo boxes. I have an option group that has 4 option buttons for the user to indicate how many staff members to include. Once the user selects one of the option buttons, the appropriate number of combo boxes become enabled and contain the...
0
9568
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
10160
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
10007
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
9951
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
8831
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
7378
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
6649
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
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2805
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.