473,549 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo boxes - Changing behaviours/locking combo boxes

108 New Member
I have Three combo boxes that ideally I want the the users to access in the correct sequence as they depend on the value within the combo box before them.

#1 Facility
#2 Area
#3 Sport

I.e. If Facility is blank the vba code behind Form (On current) updates the Area combo box fails as its expects a value.

Private Sub Form_Current()
Me.comboArea.Ro wSource = "Select Area.Area_ID, Area.Area, Facility.Facili ty " & _
"FROM Facility INNER JOIN Area ON Facility.Facili ty_ID = Area.Facility_I D " & _
"WHERE Area.Facility_I D = " & Me.combofacilit y.Value & ";"

Me.comboSport.R owSource = "Select Sport_ID, Sport " & _
"FROM Sport " & _
"WHERE Sport.Area_ID = " & Me.comboArea.Va lue & ";"
End Sub

So is there a method to force them to enter values in the combo boxes in that set order/locking the others out?

Also another issue which is confusing me is that If I change say the facility after all the other combo boxes are populated, it wont impact the values in the other combos making some data incorrect.

I expected this but even though I forced 'Enforced Referential Integrity'
I didnt expect the data to be saved, expected database error.

I know this would be hard to diagnose without detailed info,
Ive attached piccy of my relationships, hopefully easier to understand than my mad ramblings.

Nov 24 '06 #1
1 1310
NeoPa
32,564 Recognized Expert Moderator MVP
So is there a method to force them to enter values in the combo boxes in that set order/locking the others out?
You could start with them all (except the first) being disabled and enable them in the AfterUpdate event of the previous control to handle the order.

Also another issue which is confusing me is that If I change say the facility after all the other combo boxes are populated, it wont impact the values in the other combos making some data incorrect
It will affect the data selected in your form (each change) so a requery will be required after each (all) of the combo boxes is changed.
It's not clear that it will change the data in the other combo boxes, but if it does then this, also, should be requeried. In this case, the form data should not really be displayed until all boxes are reselected. The form could perhaps be hidden unless all the combo boxes are correctly selected.
Nov 25 '06 #2

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

Similar topics

3
9353
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where clause after users typed in one or several letters/digits. My problem is as follows Most of the time I need to display form in continuous format,...
1
1586
by: Dalan | last post by:
Sometime ago I had inserted two Combo Boxes on a form (cboCustomers) and (cboVendors) to lookup values in separate tables. They have worked fine except now I want to increase their usage by changing the Row Source to include any changes made in the Customers and Vendors tables to be reflected in the associated fields on the form (frmAccounts)....
2
5435
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would like to eventually be able to filter down through the tables untill i can reach one unique record. I am creating a datbase to keep track of...
0
2371
by: Andrew | last post by:
Hello, I am trying to create a chart whose underlying query is linked to 2 combo boxes on the same form. I want to pass the values from the combo boxes into the chart query to allow the chart data to be manipulated easily. The combo box uses "Row Source Type" = Table/Query. The "Row Source" references a query to extract a distinct list...
14
4950
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons for things like delete, save, edit, cancel buttons - in the footer, or on the form detail section? 2. If in the footer, how do you add them to the...
5
2208
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. The row source for combo2 is: SELECT DISTINCT tblComplaintCategory.fldComplaintCategory, tblComplaintCategory.fldComplaintCategoryID,...
6
3669
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
6
1764
by: dougmeece | last post by:
Hello, I have a form that I would like to auto-populate text boxes in based on the selection made from a combo box. I have set the form record source to a table "SubmittedTo" which contains 3 fields (4 including the ID). The fields are Name, Website and Type. I want to select the Name from a combo box and have the website and type text boxes...
8
11977
by: jmartmem | last post by:
Greetings, I have an Access 2002 continuous form called "Project Update Form" in which users can update project values presented in a series of combo boxes and text boxes. I have three combo boxes ("FY", "Qtr" and "Mth") that contain the values for a project's deadline: fiscal year, quarter and month, respectively. My goal is to build an...
0
7532
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...
0
7462
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7823
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 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...
0
6059
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...
1
5381
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...
0
5101
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...
0
3510
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1957
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
0
777
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...

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.