473,507 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

subform data disappears when entering data into main form

10 New Member
I have a form that contains 1 subform. Everything works fine until I tab into a textbox in the bottom of the main form. The data in the subform disappears on the form, but the table is updated. How to get the data visible in the subform until I exit the form. I have the record selector, naviagtion button and dividing lines set to "No", and the scroll bar to neither. I have the master and child link set to po#'s on the form/subform.
Apr 23 '10 #1
3 3411
mseo
181 New Member
hi
as I understood from your question you have to link the subform to the mainform for example if you have:
1- tableorders and its PK is orderID (its controls in the mainform)
2- tableordersdetails FK is order_ID (its controls in the subform)
you must link the subform to mainform using orderID
and you can do that from the subform properties window - data tab
link child field order_ID ( replace order_ID with name of the F.K of the tableorderdetails )
link master field orderID of the primary key of tableorders

Hope this helps
Apr 25 '10 #2
cheweedog
10 New Member
@mseo
I have linked both main form and subform with the po# as reference. Everything is working fine, because the data does store in the proper tables. The only issue is that when I tab out of subform back to mainform, the data entered into the subform disappears from the screen view, but not the table. I am looking to see why this is happening. I have tried different setting in the field properties, but nothing fixes this issue. Any other idea will be helpful.
Apr 26 '10 #3
mseo
181 New Member
hi,
ok cheweedog
you can set your mainform footer as invisible and creating command button and name it Details whereas you click this command button the subform will be visible and the code behind this command button is about preventing the subform from being visible if the required controls in the mainform is null
and this is the code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Click()
  2. If IsNull(Me.name of first control  Or Me.second control Then
  3.     MsgBox "The Fields of  ( your controls are required to add an order and its details", vbCritical
  4. Else
  5.         Me.FormFooter.Visible = False
  6.             Me.FormFooter.Visible = True
  7.             DoCmd.MoveSize Height:=8000
  8.     End If
  9. End Sub
Hope this helps
Apr 26 '10 #4

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

Similar topics

2
5344
by: ivan | last post by:
I have a form (CustomerImfo) that has a subform within it (order). Within that subform is another subform (OrderDetail). That subform (OrderDetail) is displayed in Datasheet view. When I am...
6
2025
by: Ray | last post by:
I have a main form with a subform. The main form has a combo box which lists all the clients which in turn are displayed in the subform. The subform is bound to the combo box and all work well....
2
343
by: Claude | last post by:
Let' say we have an application for a production facility running 24/7 broken into 3 shifts 6-2,2-10,10-6 each production report date contains 3 shifts as above in each shift there can be from...
1
2337
by: Alienz | last post by:
Alien hello to whoever is reading today. Ill try to explain this as simply as possible its just a weird thing thats happening here in Access 2000 subforms.. I think something small is out of...
1
2490
by: Traci | last post by:
My problem is in a form/subform. On the main form I have an unbound listbox named OptionsInPlan. In the OnCurrent event of the main form I set the value of the listbox with the code:...
1
3489
by: Susan | last post by:
I have a bound form and subform and am trying to enter the data in both forms programatically. The Linkmaster and Linkchild properties are set. My intent is to be able to look at the data before it...
1
2198
by: Trent | last post by:
I am in the design phase of a new database and am having a devil of a time with a subform. I have three tables that relate to problem - Suppliers tbl, Customers tbl and a SuppliersCustomers tbl....
9
9667
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
2
1462
by: Craig | last post by:
I am trying to create a form that shows quote info, but also has a subform that lists all keywords and allows you to select multiple keywords to associate with that quote. I have never done a...
1
2117
by: bkberg05 | last post by:
Hi -I have a form which contains a sub-form. The sub-form is tied to the main form by a shared field called Project_ID. The main form has one record per Project. The sub-form has many records per...
0
7223
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
7376
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...
1
7031
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
7485
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...
1
5042
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
4702
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
3191
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
1542
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 ...
0
412
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.