473,387 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Making a Pop Up "Combo Box" using a "Check Box"

Hi newby here sorry if this sounds bread and butter stuff.

Using MS Access 2003

On a Form I want two Combo boxes which are getting their data from a table. The Combo boxes are A "Price 1" & B "If Bank Holiday Price Two". Is it possible to have "Price 1" visible as default but then if I tick a check box to have "If Bank Holiday Price Two" pop up and the values in B be used when clicked instead of "A".

Hope this makes sense ?
Regards
Vince
Mar 26 '08 #1
1 5092
PianoMan64
374 Expert 256MB
Hi newby here sorry if this sounds bread and butter stuff.

Using MS Access 2003

On a Form I want two Combo boxes which are getting their data from a table. The Combo boxes are A "Price 1" & B "If Bank Holiday Price Two". Is it possible to have "Price 1" visible as default but then if I tick a check box to have "If Bank Holiday Price Two" pop up and the values in B be used when clicked instead of "A".

Hope this makes sense ?
Regards
Vince
So Vince, If I understand your question, you're wanting to know if in the combo box, if you click a checkbox on the form you want the Price1 to display a different column in the Pricing table?

If so,

Here's what you're going to need to do:

1. On the check box control, you need to get the properties of that control to display on the screen.
2. Scroll down through the properties until you locate the OnChange Event.
3. in the OnChange event there is a little button off to the right of that entry field there once you click on it, that will display ... to the right of the entry field.
3. click the ... button
4. Paste the following code -> you will have to change the field names to what is in your table so that it works as well as the table Name and control names as well.

Expand|Select|Wrap|Line Numbers
  1.  
  2. If me.checkboxControlname.value = True then
  3.      me.comboboxcontrolname.rowsource = "SELECT ID, Description, Price2 FROM PriceList"
  4. else
  5.      me.comboboxcontrolname.rowsource = "SELECT ID, Description, Price1 FROM PriceList"
  6. End if
  7.  
Mar 29 '08 #2

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

Similar topics

3
by: deko | last post by:
SELECT TxType_ID, TxTypeName FROM tblTxType UNION SELECT Top 1 TxType_ID, "<Payment Account>" FROM tblTxType ORDER BY ; The problem I'm having is that the Top 1 "TxType_ID" brings up a...
8
by: ShyGuy | last post by:
Is it possible to use code to enter some text into a combo box and then have the cursor placed at the end of the text for more imput?
1
by: Jeff_F | last post by:
Hi all. Question in two parts. I'm looking to add two combo boxes. The first will contain regions and the second will contain employee names which correspond to the region selected in the first...
15
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...
9
by: Bob Alston | last post by:
I have a drop down combo box that gives the user to enter an item not in the list by adding it to the list. The list is a table. It works fine on Access2003 but fails on Access2002/XP. ON XP, it...
3
by: Jimmy | last post by:
I use a combo box to filter the results of a form. Sql for combo box is... SELECT StatusPriority, Status FROM tblStatus UNION Select = 0 as AllChoice, "Show All" as Bogus From tblStatus ORDER...
5
by: tombev | last post by:
How do I add "ALL" (as the top choicce) in a drop down combo box in Access? (combo box only has one field)
3
by: Gord | last post by:
Is it possible to somehow add the option of "All" at the top of the list of a combo's drop down list? I'm hoping I don't have to go and re-jig the underlying table and/or query that the list is...
2
by: puzzled | last post by:
I have "Find" buttons throughout my database, each with focus on a different field (they were created with the wizard, then the focus set to the corresponding field with VB). If i press a find button...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...

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.