Hello
It is me again. I have another issue that I can not solve by myself or with google and would be happy if you could help me.
My database consists a form with details of persons. There is a subform with a combobox that consists "languages" and there is a checkbox on the mainform (yes/no) with the name "Translator".
I would like that the checkbox "Translator" is automatically activated if a language from the combobox in the subform is chosen and vice versa. What I would like in addition, is that the checkbox can not be activated or deactivated manually by the enduser of the form.
Can anybody tell me how I can do that?
Greetings and thanks!!
Mike
16 1491
With the number of answers I have provided, I might just as well have written your DB
Firstly if you have a Combo box for languages, you restrict the person to only 1 language,
Secondly, from your description of what you want, if a language is selected, by definition the person is a translator, so there is no point in the translator checkbox.
Thirdly, with only one language allowed, this should be a Combo box in your main form, so what is in your subform?
Do you need a rethink?
Phil
Dear Phil
Thanks a lot, and yes, you have provided really a lot of answers for which I am very thankful!! I hope I won't have many more questions...
I have a subform in which is a combobox with languages. For each person, more than one language can be chosen. The languages are in an individual "page" in a subform. On the main page of the form, I have the checkbox with the languages so that you see just in a second whether a person can be asked for translation or not. Therefore, the checkbox.
Greetings
Mike
OK Mike, that's clear, but are you saying that if a person has any language then they can translate ALL the languages listed on the subform, or are you saying that they are good at some languages which they can translate, and have limited ability in other languages? In which case the checkbox should be on the subform.
If it is the former, I still can't see what the check box achieves as an entry on a subform is far easier to see than a tick in a chec box.
Phil
Dear Phil
Thanks for your answer. My question is about the former situation, meaning that when a language is in the combo, then the person can do the translation for that language and is a translator.
The checkbox is to make it much faster visible for the user of the database. To understand that, I send you a short attachment.
Mike
OK. First set the Translator Check Box to Locked = Yes. That stops manual changing.
Then on current of the main form you need something like -
ChkTranslater = [LanguageSubForm].[Form].RecordsetClone.RecordCount > 0
-
So see if there are any language records and set the Translator box accordingly.
You will need a similar routine on the After Update of the language subform
Phil
Dear Phil
I could not really succeed, sorry. I have a main form in which the checkbox is situated, a subform and a combobox in the subform.
If you feel tired of helping me, I am really sorry. I will try not to poste more questions after that problem...
Thanks!
Mike
More than happy to help. Mike.
So what's the name of your subform?
Is there any information on it other than the language?
What code did you try?
Phil
Dear Phil
Thank you!
The name of my SubForm is "T_Sprache-Unterformular". There is no other information on it than just the languages in the combobox "cmbSprache" out of the table "T_Sprache".
The mainform where the checkbox "Checkbox Übersetzer" is, is called "MainForm".
I tried the code you sent me on the Combo and additionally on the main form. It did not work, therefore I tried to put the Code on the Subform instead of the main form. I did the same with codes like the following, without success:
If Me.cmbSprache = 1 Then
Me.Checkbox_Übersetzer = True
Else
Me.Checkbox_Übersetzer = False
End If
I tried different codes like that which I found in the internet...
Mike
I'll try to get my head round the German -
Private Sub Form_Current()
-
-
Übersetzer = T_Sprache-Unterformular.Form.RecordsetClone.RecordCount > 0
-
-
End Sub
-
In even better way if this is so important would be to have a great big label called LblÜbersetzer with the Caption Übersetzer and change the code to -
Private Sub Form_Current()
-
-
LblÜbersetzer.Visible = T_Sprache-Unterformular.Form.RecordsetClone.RecordCount > 0
-
-
End Sub
-
Phil
Dear Phil
Thanks a lot for your answer. Do I have to put this VBA-Code into the checkbox and in the main form? Where would I have to put it in the Checkbox (by click or by what?)?
Thank you
Mike
You need it in the On Current of your main form so that as each main form record is read, a check is made on the number of records in the subform.
On the Subform you need -
Private Sub Form_AfterUpdate()
-
-
Me.Parent!Übersetzer = Me.RecordsetClone.RecordCount > 0
-
-
End Sub
-
So here we see if there are any languages in the subform, and change the check box in the parent (MainForm) accordingly.
Phil
Dear Phil
Thanks a lot, I have tried many codes, unfortunately without success: Main Form - Private Sub Form_Current()
-
CheckBox Übersetzer = T_Sprache- Unterformular.Form.RecordsetClone.RecordCount > 0
-
End Sub
-
- Private Sub Form_Current()
-
Übersetzer = T_Sprache-Unterformular.Form.RecordsetClone.RecordCount > 0
-
End Sub
-
- Private Sub Form_Current()
-
CheckBox_Übersetzer = T_Sprache- Unterformular.Form.cmbSpracheClone.RecordCount > 0
-
End Sub
-
The whole thing also on the subform with the basis of: - Private Sub Form_AfterUpdate()
-
Me.Parent!Übersetzer = Me.RecordsetClone.RecordCount > 0
-
End Sub
-
I have also tried to put the name of the checkbox and of the other data in brackets, but it did not work out.
Can you tell me what I am doing wrong?
Thank you!
Mike
Mike, I have no idea what you are doing wrong.
It certainly works on my test database.
Can I suggest to send me a copy of your Db (with sensitive information stripped out).
Use the Private Message Option
Phil
Dear Phil
How can I send you an attachment in the Private Message Option? I could not find an option to make an attachment.
Mike
Hi Mike
See your Private Messages
Phil
Phil helped me to solve the problem, thanks a lot! The VBA-Codes are like that:
Main form - Private Sub Form_Current()
-
[Checkbox Übersetzer] = [T_Sprache-Unterformular].Form.RecordsetClone.RecordCount > 0
-
End Sub
Subform
First VBA After Update: - Private Sub Form_AfterUpdate()
-
Me.Parent![Checkbox Übersetzer] = Me.RecordsetClone.RecordCount > 0
-
End Sub
Second VBA AfterDelConfirm - Private Sub Form_AfterDelConfirm(Status As Integer)
-
Me.Parent![Checkbox Übersetzer] = Me.RecordsetClone.RecordCount > 0
-
End Sub
Thank you very much, Phil!!!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Jason McDonald |
last post by:
I have a PDF form that has a combo box "no_wireless_mics" with the
values "1" "2" and " " where " " is the default. I need a JavaScript
that will cause the check box "wireless_mics" to be checked...
|
by: wolf_y |
last post by:
My question is simply: under what conditions will empty tags of the
form <MOM></MOM> pass schema validation? Of course, the mirror
question is: under what conditions will empty tags fail...
|
by: arun.hallan |
last post by:
Hi,
I have two columns in a datagrid that are filled with checkboxes.
I want one checkbox in a row to be checked when the corresponding
checkbox is checked.
I've added an OnCheckedChanged...
|
by: ayeung |
last post by:
Hi,
I have written a GUI application that I want to automatically run on a Linux system (Fedora Core 6) upon powerup. I've created a script which runs correctly and have added a run script using...
|
by: tvnaidu |
last post by:
How can I disable checkbox when it is selected Kernel?.
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td align="right" width="40%" valign="top"...
| |
by: yappy77 |
last post by:
I am trying to change the label color of a checkbox on a subform if it is checked.
The code I have so far is:
Private Sub Emergency_Contact_Click()
If Me.Emergency Contact = True Then...
|
by: debre |
last post by:
hi,
i m new to asp.net n i m tryin to work wit datagrid.
my prob is tat...when i click the header checkbox all d checkbox in the first page is selected n when i go to d sec page in datagrid..the...
|
by: TensE |
last post by:
How do I make specific checkboxes be checked when I select an entry in a combobox? Like if I select entry 1 checkbox 1 and 3 will be checked if entry 2 then 3 and 4 be checked? So far I'm...
|
by: tamcq |
last post by:
When my database is opened, it starts with the form Patients.Page 2 of the the Patients form contains a subform called New Record. This New Record subform is where you put entries about the...
|
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,...
|
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,...
| |
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: 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...
|
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...
|
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,...
|
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...
|
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 ...
| |
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...
| |