473,467 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using a checkbox in a subform to check a box in the main form

3 New Member
I am setting up a subform with a one-to-many relationship to an item in the main form. I have put an identical check box in both the main and subform. What I would like to do, is to set it up so that if I check the box on any of the entries in the subform it will auto-check the box in the main form. I would appreciate any help you might be able to give. Thanks!
Jan 25 '16 #1
5 1768
Seth Schrock
2,965 Recognized Expert Specialist
Welcome to Bytes! You might check out the following website: Database Normalization. It might help out so that you don't need both checkboxes.

If you still do, then you just need to put the following in the subform's checkbox:
Expand|Select|Wrap|Line Numbers
  1. If Me.Subform_Checkbox_Name = True Then
  2.     Me.Parent.checkbox_name = True
  3. End If
Jan 25 '16 #2
dpfrog
3 New Member
Thank you for responding. Sorry I am not as experienced as I would like. The name of the parent form is main, the name of the subform is subLiteratureCited, and the check box is benthic. If I read your response correctly it should look like:
If Me.subLiteratureCited_Benthic = True Then
Me.Parent.benthic = True
End If
Is this correct? I have tried this and a couple of other variations and none seem to be working. I always get a compile error.
Jan 25 '16 #3
Seth Schrock
2,965 Recognized Expert Specialist
If the checkbox on both forms is named the same, then your If line needs to be
Expand|Select|Wrap|Line Numbers
  1. If Me.Benthic = True Then
FYI, please use code tags when posting code (the [CODE/] button adds them for you).
Jan 25 '16 #4
dpfrog
3 New Member
That is working. Thank you!
Jan 25 '16 #5
Seth Schrock
2,965 Recognized Expert Specialist
Good luck on your project.
Jan 25 '16 #6

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

Similar topics

0
by: Ellen Manning | last post by:
I've got an A2K form with a subform based on a query. This query has a checkbox and an amount field and returns records if checkbox is checked. I Dsum the amount field and display on the main...
4
by: Craig M | last post by:
Hi, I have 2 forms, frmretailorders, and frmretailorderline. in the oncurrent of the main form, I check what the value of !status is. If it is "complete", then i disable all text and combo...
1
by: New2Access | last post by:
Hi, I have a form thats used to enter records into a table. The table and form have fields for Name, week, project, and hours. To assist users, I wish to add a subform that will show them how...
18
by: Darryl Kerkeslager | last post by:
I don't do much with subforms - in fact I've deliberately avoided them - but .... I have a tab control that will contain several subforms, each bound to a separate table, and each table/subform...
1
by: NBruch | last post by:
Ok let me explain what im trying to do: i need a combo box which needs to be linked to a listbox (or combo box doesnt matter which really) then the listbox should bring up the record in a...
1
by: luv4nrt | last post by:
Hello all, I have a membership dB in which I have a form that updates data in 4 tables. One of the tables is bounded to a subform within the Main membership form. I am trying to link all four...
3
by: virtualgreek | last post by:
Dear all, I have a scenario that is driving me nuts. (MS Access 2003) I have a form/subform (Continuous form) where it gets its data from tables Order and Order_Details. In the footer...
5
by: AccessBeetle | last post by:
I have a table bound main form.It is a simple data entry form. It has 5 tabs and each tab contains a subform. There is a checkbox called chkShortRpt. I want something like this: When user clicks on...
4
beacon
by: beacon | last post by:
Hi everybody, I have a main form, frmDeficiency, that has a tab control, deficiencyTabControl, that has a subform, fsubEpisodeDetail, on page 2 of the tab control. I also have a command button...
10
by: ittechguy | last post by:
I'm trying to create a search form which is located in my main form. I need it to filter several subforms. My main form contains building name and room name. I have a subform for customer...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
1
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
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
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...
0
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...
0
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 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.