473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Populating all fields in a table with the use of a subform

39
I use Windows XP and Access 2003
I have a table called tblProcessLine
it contains the following fields:

Autonumber1 PK
Date
WorkOrder
Qty
LoadNumber
Timein
TimeOut
Shift
Badge
Rework
Billets
Pinwheel
Trimtabs

I have a main form that fills in the following fields:
Date
LoadNumber
TimeIN
TimeOut
Shift
Rework (yes/no)
Badge

I have a subform that fills in:

WorkOrder
Qty

I need the WorkOrder row to also contain all the information in the main form as well as the subform. This is not happening. I get blank fields in the rows where the WorkOrder is populated. I was wondering if need VBA code to read and populate those fields.

Any help would be great.
Oct 6 '08 #1
7 1198
FishVal
2,653 Expert 2GB
Hello, Arli.

I guess both main form and subform are bound to your table.
If so, then all you need is to put the table PK into Master and Child properties of the subform control.

Regards,
Fish
Oct 6 '08 #2
nico5038
3,080 Expert 2GB
Hmm, I would start with normalizing your table from tblProcessLine into tblProcessHeader and tblProcessLine.
Now the "Header" data doesn't have to be replicated and when using the "Header" as the main form, than Access will propose to link the OrderID of the Header as the linkage field to a sub form based on tblProcessLine.

Best to check out the NorthWind.mdb sample database from Microsoft to see how the Order and Orderdetail is created and maintained.

Nic;o)
Oct 6 '08 #3
Arli
39
Hello, Arli.

I guess both main form and subform are bound to your table.
If so, then all you need is to put the table PK into Master and Child properties of the subform control.

Regards,
Fish

I did this and still it does not work correctly. I still get the information from the main form on a single line, with the information from the WorkOrder subform on the next lines (AutoNumber numbers these lines). I need the following fields to cascade down into those lines (Date, TimeStart, TimeOut) as I will have use for these fields in other queries later on. When I put the fields I need in the master and child properties (i.e. AutoNumber1;Date;), I get an error stating that Date is not a part of the object.

Please help :(
Oct 8 '08 #4
nico5038
3,080 Expert 2GB
Do you have two tables or one ?

Nic;o)
Oct 8 '08 #5
Arli
39
I changed it so that it is one table at this point.

Thanks for your input.
Oct 8 '08 #6
nico5038
3,080 Expert 2GB
I would start with normalizing your table from tblProcessLine into tblProcessHeader and tblProcessLine.
This will allow automatic linking of the "Header" data with the "Line" data when using a Main and Sub form..

Checkout the Northwind sample .mdb.

Nic;o)
Oct 8 '08 #7
Arli
39
That helped alot. Looking at the Northwind data base helped.

Thanks
Oct 9 '08 #8

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

Similar topics

3
by: sao | last post by:
I am currently using Access 2000. In my table it is the following fields that are set up: 1 - Staff Name 2 - Department This table is already populated with 100+ records (staff along with...
0
by: KB | last post by:
I am creatig a database in 2000 where I need to be able to have the users add data and information into lookup tables. That is no problem, I have a form for that, that works fine. This...
1
by: tconway | last post by:
I have an Access program that displays Customer data into a form and OrderID data into a subform. The totals in the Subform are based on calculated fields, i.e. the Total Amount field Calculates...
2
by: John | last post by:
I have two tables in a 1:M relationship- the parent has 5 fields in the primary key and the child 6 (these are actually pretty far downstream in a complicated ER model, but the problem is between...
4
by: Don Do | last post by:
Help I built a form/subform/subsubform setup using the access forms wizard. I have a table1 = parent, table2 = child, table3 = (grandchild?). There will be multiple records in table2 that tie...
1
by: campbellbrian2001 | last post by:
I have a form with a sub-form (in continuous forms view to simulate a datasheet view) from which the user can double-click a product number and open a new form which will display that number and...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
1
by: canam | last post by:
I hope someone can help me with this. I have an input form with a subform that opens up in data sheet view. The subform is called based on 2 fields - BusinessName & Commodity - in other words...
3
by: pzh20 | last post by:
I have an unbound form/subform where I populate a combo box on the main form, and using the onchange event, display fields from a table in a datasheet subform. I want to add a new record via the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.