Hello:
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 list will
-
'display in the drop down list of CboSegment
-
-
With Me![cboSegment]
-
If IsNull(Me!cboDivision) Then
-
.RowSource = ""
-
Else
-
.RowSource = "SELECT DISTINCT tblSegment.SegmentID, " & _
-
"tblSegment.SegmentName " & _
-
"FROM TblLocationsMM INNER JOIN tblSegment " & _
-
"ON TblLocationsMM.SegmentIDFK = tblSegment.SegmentID " & _
-
"WHERE [DivisionIDFK]=" & Me!cboDivision
-
-
End If
-
Call .Requery
-
-
'Have the first dropdown list of cboSegment visible
-
If Me![cboSegment].ListCount > 0 Then
-
Me![cboSegment] = Me![cboSegment].Column(0, 0)
-
-
End If
-
End With
-
-
End Sub
What I now trying to do is clear out any selections that have been made if the previous one has been changed...
The combo box names on the form are the following:
cboDivision
cboSegment
cboWrkReg
cboCreditReg
cboBrokerType
Can anyone help me with the code?
Thanks,
Keith.
2 2080
Hello:
Basically, what I am trying to do is make sure that the selections that they have selected is one of my Unique "LocationID s" in my tblLocationsMM. Right now they are able to move forward to the next form even though the LocationID does not exists.
What would be the best approach for preventing this scenario?
Thanks,
Keith.
Okay I solved this one, no need to reply....
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: cognoscento |
last post by:
I'm currently putting together a database for my work (not an expert by
any stretch, so muddling through as best as I can... you know the
story...) and I could use some advice and hand-holding
I've got a subform with a series of cascading combo boxes (thanks to
the Access tutorials on fontstuff.com) that let the user assign
categories to items, in this case photos. This is being done to help
constrain user selections and keep the...
|
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 second combo to
change depending on what values the user selects in the first box, it's
just that every time the user changes the first combobox, the second
combobox FOR EVERY RECORD goes blank.
|
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 determines the available options in the other.
TERMINOLOGY
Row Source: The table/query from which the Combo Box or List Box gets its values. Note: There are other types of row sources that can be used but for simplicity we will stick with Tables...
|
by: kcdoell |
last post by:
I have three tables:
One for the Division location:
tblDivision
DivisionID = Autonumber
DivisionName = Text
One for the Working Region:
tblWrkRegion
|
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 below.
tblOrg
OrgID, AutoNumber, PK
ZipID, Number, FK
tblState
StateID, AutoNumber, PK
| |
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 list will
'display in the drop down list of CboSegment
With Me!
If IsNull(Me!cboDivision) Then
|
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 currently trying to set up a whole pile of cascading combo boxes of different levels of complexity, so I started with the easiest set - and can't even get that to work (even using the tutorial on this site at...
|
by: 20028431 |
last post by:
This is driving me mad!
I have been trying for 3 days now to work out how to do this with no success.
I have tables for Customer, Bookings, Entertainment, Act, Agent, and several others.
I have created a form to view existing bookings with Customer details as mainform and Bookings and Entertainment as subforms and this works fine.
I am trying to create forms to allow the booking clerk to enter a new Booking and am looking to have a...
|
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...
|
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,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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 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...
| |