473,466 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Keep Subform record on the form after closing mainform

2 New Member
Hi all,

I have a Mainform and a subform, and a subsubform.

The purpose is to allow people to enter information on the forms and can edit it when the form is re-opened.

My problem is, when I close the mainform and reopen it, the subform is blank.

Since, my subform has a subsubform under tab control, it is a single form.

How can I keep the subform records when re-opening the mainform?

thanks

Attached Images
File Type: jpg question.jpg (31.2 KB, 265 views)
Jun 25 '18 #1
5 1251
twinnyfo
3,653 Recognized Expert Moderator Specialist
accesswinston,

Welcome to Bytes!

It sounds more like the problem is with the Parent-Child relationship between the forms. If this is set properly, whatever record the main form has on it, the related records in the subforms will be displayed. This is the typical structure for Main-Subforms.

Is this how your forms are set up?

Your questions isn't exactly clear, either, because you don't mention what record the user is supposed to go to when the main for opens....
Jun 25 '18 #2
accesswinston
2 New Member
Let's say,
the mainform contains Address and Job_ID.
the subform contains Equipment and Equipment_ID.
the subsubform contains Consummables and Labour.
The user is supposed to input multiple consummables and labours for each Equipment; and multiple Equipments for one Job.

It works well when the mainform is open. But if the user re-open the form, all contents in the subform are blank.
Jun 25 '18 #3
twinnyfo
3,653 Recognized Expert Moderator Specialist
However, you haven't really said anything that you haven't already said.

If you have your forms built with a proper Parent-Child relationships whenever you navigate your main form to the Job_ID, the Equipment and consummables should display. And you have not answered my question as to whether these relationships are built.

Unless you want to get extremely and unecessarily complicated, forms are not typically designed to open to a person's most recent record. It can certainly open to the last record of a record set or the record most recently modified (which, again, requires some more complexification).

However, based on what you have said thus far, the forms are behaving as expected.
Jun 25 '18 #4
NeoPa
32,556 Recognized Expert Moderator MVP
Hi Winston.

In a way what Twinny's saying is we can't tell where you've gone wrong if you don't give any indication as to what you've done, or tried to do.

We know you've done something wrong. We can't hope to identify what that might be when we have no information as to anything you've done.

Does that make sense.
Jun 25 '18 #5
Nauticalgent
100 New Member
Sounds like either the tables relationships are flawed, the parent/child links on the forms are not set up properly or both.

But without more input from the OP, this is speculation at best.
Jun 26 '18 #6

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

Similar topics

3
by: jburris | last post by:
I have been through enough of these threads to think that this should be an easy fix... but, are there circumstances in which the following code syntax does not work? =!!.Form! (this is out of...
2
by: news.microsoft.com | last post by:
Hi there, I was just curious if anyone knew how to create a .Net event that is similar to Form.Closing event, where in I can set the Cancel property of the event argument to true and it will...
8
by: Mickey Swanson | last post by:
Is there any way to determing why a form is closing? As in if the user cliced the x button or if a system shutdown has started. thanks for any help Mickey Swanson
6
by: **Developer** | last post by:
I've been looking but can't find out how in a form Closing event to know if the closing is because the form's "X" had been clicked or the main form's "X" was clicked. That is, I need to know if...
4
by: Ecohouse | last post by:
have a main form with two tabs, and each tab has a subform. The first tab's subform refers to the mainform (this works). The second tab's subform refers to the identity key of the first tab's...
1
by: alex.gruenther | last post by:
I am new to Access and need help creating an edit record form. I've got a table called Player with attributes like name, address, phone, etc. I've created an edit player form with a combo box...
0
by: ApexData | last post by:
I have a subForm sitting on my MainForm. The subForm is a continuous form and Does Not have its RowSource tied to the main Form. If the subform is tested in isolation, outside the MainForm and I...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
1
by: Aleksey Timonin | last post by:
Hi guys, I show my Form in dialog mode. So I have "Ok" button on it with DialogResult = Ok. What is the right way and how can I abort form closing from the button click event. Thanks a lot...
10
by: Hulas | last post by:
Guys I have a form with a 'save' and 'close form' button. How do I make sure that the user has saved the record before closing it. What I am looking for is that I want to modify the 'close form'...
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...
0
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,...
0
jinu1996
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...
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
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.