473,385 Members | 1,720 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,385 software developers and data experts.

Cascading Combo Boxes in a Tabular Form

Hi Everyone.

I've been having a little touble with a form I'm working on. (I'm a MS Access hobbiest). I've set up the cascading combo boxes, which is working, (I took the code from Microsoft) on a single item form.
However as the form I need is a of tabular type, every time I update cbo1 to a value, the non matching cbo1's cbo2 field blanks out. The data remains as but is hidden, and not what I need.

The data is all linked to bound fields.

All the VBA code I'm using is just an AfterUpdate requery on both combo boxes, and a requery on Form_Current. (I'm not well versed in VBA)

The data should show as follows:

cbo1 - cbo2
-----------------------------
Apple - Macintosh
Apple - Grany Smith
Orange - Mandarin
Orange - Naval
Banana - Generic
Orange - [New Data Here]

However what is displayed is as follows:

cbo1 - cbo2
-----------------
Apple - [Blank]
Apple - [Blank]
Orange - Mandarin
Orange - Naval
Banana - [Blank]
Orange - [New Data Here]

Any help you can give would be great!

The ShadowHawk
Jun 9 '07 #1
2 2288
Ok. What I've done to see the value of the cell is place an text box over the combo box. While this shows the index number, I want to show the actual text like in the combo box.

How do I get the Text box to look up the following:

SELECT stbl_Service_Item.SubService_ID, stbl_Service_Item.Sub_Service_Details, stbl_Service_Item.Service_ID
FROM stbl_Service_Item
WHERE (((stbl_Service_Item.Service_ID)=Forms!main!Servic e!Service_Item))
ORDER BY stbl_Service_Item.Sub_Service_Details;

And display only "stbl_Service_Item.Sub_Service_Details"
Jun 9 '07 #2
puppydogbuddy
1,923 Expert 1GB
Ok. What I've done to see the value of the cell is place an text box over the combo box. While this shows the index number, I want to show the actual text like in the combo box.

How do I get the Text box to look up the following:

SELECT stbl_Service_Item.SubService_ID, stbl_Service_Item.Sub_Service_Details, stbl_Service_Item.Service_ID
FROM stbl_Service_Item
WHERE (((stbl_Service_Item.Service_ID)=Forms!main!Servic e!Service_Item))
ORDER BY stbl_Service_Item.Sub_Service_Details;

And display only "stbl_Service_Item.Sub_Service_Details"
Save your query and use the saved query in a DLookup to display its results in a textbox like this:
Expand|Select|Wrap|Line Numbers
  1. YourTextbox.Value = DLookup("[stbl_Service_Item.Sub_Service_Details]","YourQuery")
  2.  
Jun 10 '07 #3

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

Similar topics

9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
6
by: visionstate | last post by:
Hi there, I am building a database that requires cascading lists on a form. I currently have (I may be adding more later) 3 combo boxes on my form - Department, Surname and Forename. The user...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
3
by: buddyr | last post by:
Hello, Yesterday I recieved help with two cascading combo boxes on an access form. I went the link http://www.fontstuff.com/access/acctut10.htm And basically used their first example. Now I...
4
klarae99
by: klarae99 | last post by:
Hello, I am working on an Access 2003 Database. The tables that pertain to this issue are tblOrg, tblState, tblCity, and tblZip. I have posted the table structure with only the pertinant fields...
1
kcdoell
by: kcdoell | last post by:
Good Morning: I have a form where I am trying to create cascading combo boxes. I have done this before but I am getting the following error that is throwing me off: Procedure declaration...
3
kcdoell
by: kcdoell | last post by:
I have 5 cascading combo boxes on a form. Below is a sample of my vb in the first combo box: Private Sub CboDivision_AfterUpdate() 'When the Division is selected, the appropriate Segment...
7
by: Toireasa | last post by:
Hi, Newbie Access developer here, and my first post on this forum, so I might not get everything right - thanks in advance for your help and your patience! I'm using Access 2007, in XP. I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
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...

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.