473,500 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

4 possible options (based on value combination from 2 combo boxes)

3 New Member
hi,

on my form there are 2 combos (ms access)

combo1 contains values: 1, 2, 3, 4, 5
combo2 contains values: a, b, c, d, e

if you choose 1 or 2 or 3 from combo1 and a or b from combo 2 it should make label1 visible

if you choose 4 or 5 from combo1 and a, b, c, from combo2 it should make label1 visible & label2 visible

if 4 or 5 & d or e make label2.visible = true

else
label2.visible = false
label1.visible = false

any idea how to make this working? (my problem is writing of the conditions
Oct 10 '07 #1
1 1352
nico5038
3,080 Recognized Expert Specialist
hi,

on my form there are 2 combos (ms access)

combo1 contains values: 1, 2, 3, 4, 5
combo2 contains values: a, b, c, d, e

if you choose 1 or 2 or 3 from combo1 and a or b from combo 2 it should make label1 visible

if you choose 4 or 5 from combo1 and a, b, c, from combo2 it should make label1 visible & label2 visible

if 4 or 5 & d or e make label2.visible = true

else
label2.visible = false
label1.visible = false

any idea how to make this working? (my problem is writing of the conditions
I would probably create a table with 3 fields:
Combination TEXT (being 1a, 1b, 1c, etc)
Label1 Boolean (YesNo field holding True or False)
Label2 Boolean (YesNo field holding True or False)

Now you can put all combinations in the table and use the value for label1 and label2 to set the correct value, like:

Me.label1.visible = NZ(Dlookup("label1","tblLabels","Combination='" & me.combo1 & me.combo2 & "'"),False)
Me.label2.visible = NZ(Dlookup("label1","tblLabels","Combination='" & me.combo1 & me.combo2 & "'"),False)

The Dlookup will return nothing when a combination isn't found and the NZ() function will set then the default value to False. This way combinations not needing a label1 and/or label2 don't have to be defined in the table.

Idea ?

Nic;o)
Oct 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11083
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
3
2562
by: joni b | last post by:
I need help limiting the options shown in a combo box. I have two combo boxes that appear in a datasheet view subform. The form looks like an Excel spreadsheet, which is what the user prefers....
15
2943
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
5
2201
by: consonanza | last post by:
I am working on a report filter form. It has 2 combo boxes (cmboSelectSubject and cmboSelectCategory) to select criteria. Selecting an entry in combo 1 restricts the options available in combo 2....
0
894
by: =?Utf-8?B?UmVkYmFjaw==?= | last post by:
I am trying to implement a data entry for a timesheet. I'm using VB.net 2005. Using a datagridview, I want to have the datagridview bound to a table. Lets say the table has timesheet data...
1
1285
by: Jon1492 | last post by:
I've been trying to figure this out for a few hours now. I have an MS Access 2003 quote configuration tool that produces quotes based on about 100 different controls (including option groups,...
1
1894
by: scanreg | last post by:
My form needs to (1) direct to specified URLs based on a combination of form selections and (2) enable/disable form features based on selections within the form FORM Radio 1 - A - B - C ...
9
4974
by: Marianne160 | last post by:
Hi, I know there are various answers to this problem available on the web but none of them seem to work for me. I am using Access 2003 to make a form to look up data from a table. I have so far...
3
5853
by: dufnobles via AccessMonster.com | last post by:
I have a form that displays a dropdown box. The options in the drop down vary according to a value queried from a database boolean (Yes/No) field. I would like to do the following: If the...
0
7136
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,...
0
7018
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...
0
7232
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...
0
7397
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...
0
5490
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,...
0
3110
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...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
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...

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.