473,480 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to lock/disable a subsubform depending on value in a bound combo box in subform?

25 New Member
Hello everybody
i am building my dataabse for patient record. my main record entry form "patients Record" is a tabbed form with tabsas follows
tab "NOK" having subform NOK,
tab "History/Exam" having subform History and subsubform Exam,
tab "Admission" having subform Admission

all the subforms are subform to main form "Patients Record"

Now on subform History, there is a bound combo box named "AdmNeed" with values; "Admission not required", "Admission required now" and "Admission required in future"

Now I want that if "Admission not required" is selected in "AdmNeed" combo box, subform Admission on tab "Admission" should be automatically disabled and if any of the other choices is selected, it should remain enabled...

can anybody help me..?
Mar 14 '11 #1
1 1512
NeoPa
32,556 Recognized Expert Moderator MVP
You need to cover a number of issues :
  1. Referring to Items on a Sub-Form is something you'll be needing to get right. The Sub-Form control that a form is contained in can be referred to, from the code of the form itself, as .Parent.
  2. Once you have determined how correctly to refer to one item from another, you need to set the .Locked or .Enabled properties of the Admission tab appropriately.
  3. When to do it - Or where in your code?
    This is important. Not only should it handle when new records are displayed (The Current event), but it should also handle when the value is changed within a record (The AfterUpdate event of the control).

This should be enough to help you resolve the issue. If you need more then please specify clearly how far you did get when trying out these suggestions. Best of luck.
Mar 14 '11 #2

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

Similar topics

1
8415
by: John Michael | last post by:
I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a...
2
7738
by: Ed via AccessMonster.com | last post by:
Hi all, What I am trying to do is get the value of the second column of a bound combo box in vba. example: Combo box: column 1-ID column 2-SIGN_CODE 1 R-1.gif 2 ...
1
1411
by: Adjo | last post by:
Okay, I've seen all the examples of using comboboxes on webforms when using simple values. And in the issue-tracker starterkit there is a way to use comboboxes with id/value foreign keys in a smart...
1
3339
by: James | last post by:
I am used to VB6 but need to develop something in .Net. I need to create several bound combo-boxes which will use lookup tables to get their values. I created a form using the dataform wizard....
0
907
by: James | last post by:
I have a bound combo using a lookup table which is behaving as expected with the exception of the first record. In the list of rows for my combo, the first is '.'. This is because of another...
4
2661
by: Evan | last post by:
I have a data bound combo box. The combo box displays several items (status code descriptions). After the combo box is bound, I want to set the combo box so that the "Draft" status is displayed by...
1
4852
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
9
32598
by: Vmusic | last post by:
Hi, I'm using MS Access 2002. I have a form with a combo box built from a query that returns one column, and that one column is the bound column. How do you use VBA to programmatically change...
1
10909
by: sangram | last post by:
how to select a default value of combo box in run time, i have select some value from database ,depending on this i have to set the value of combox box... advance thanks..
3
4187
by: Bill | last post by:
I have what I think should be a simple question regarding a bound combo box. My first table is Dealers: DealerID - primary key DealerName BillToLocation My second table is Locations:...
0
7041
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
6908
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
7044
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,...
1
6739
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...
0
6929
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
4481
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...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
181
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.