473,786 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting data from one subform into another subform

Thank you in advance for any assistance!
I have a Access 2000 database in which we are keeping track of package
details for orders to be sent to customers. Example: We have an order
for Company XYZ and after all the parts are pulled they are packaged
into three cartons that will be shipped to the customer. I have a Form
that has two subform. Subform1 is for data display only. Subform2 is
for data entery. As each carton is packed it's weight and dimensions
are entered into subform2. Subform2 consist of the following fields
"Package"

(Example the first carton would be package 1, the second carton would
be package 2 etc.), "Weight". Dimensions", and "Pack Date". Subform1
shows the same package information and is updated after each line is
entered. Subform1 also has a couple calculated fields 1) Total Number
of Cartons (Simple a count of the cartons entered), and 2) Total
Weight.

What I would like to do is pull the Total Number of Cartons from
Subform1 (this is an unbound text box that counts the number of cartons
displayed in Subform1) add 1 to it and use that to populate the Package
field on subform2. This is just to cut down on the number of pieces of
data the packers have to enter.
Example: Say on the order for Comapny XYZ has 2 cartons that have
already been packaged, however the order is not yet complete. The
remaining parts will go into package 3. Subform1 shows the detail for
the first two packages and also show the current count of packages as
2. I want to take the current count (2), add 1 and insert that into the
Package field on Subform2.

Thanks again!
Del

Nov 13 '05 #1
1 1816
rkc
dt****@yahoo.co m wrote:
What I would like to do is pull the Total Number of Cartons from
Subform1 (this is an unbound text box that counts the number of cartons
displayed in Subform1) add 1 to it and use that to populate the Package
field on subform2. This is just to cut down on the number of pieces of
data the packers have to enter.
Example: Say on the order for Comapny XYZ has 2 cartons that have
already been packaged, however the order is not yet complete. The
remaining parts will go into package 3. Subform1 shows the detail for
the first two packages and also show the current count of packages as
2. I want to take the current count (2), add 1 and insert that into the
Package field on Subform2.


From the Main form's code module it would be:
Me.Subform2.For m.Package.Value = Me.Subform1.For m.NumCartons.Va lue + 1

From either subform you would add Parent to the mix.
Me.Parent.Subfo rm2.Form.Packag e.Value =
Me.Parent.Subfo rm1.Form.NumCar tons.Value + 1
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3436
by: Jared Evans | last post by:
I developed a console application that will continually check a message queue to watch for any incoming data that needs to be inserted into MS SQL database. What would be a low-cost method I could use inside this console application to make sure the MS SQL database is operational before I perform the insert?
1
3661
by: learner | last post by:
I made a form which as a subform on it. The subform has two columns. I want to access the column data in the subform through event control for example, OnDblclick event. If the subform displays the table as below. Column A Column B -------- ---------- 1 Data A 2 Data B <- 2nd row
1
2507
by: BartonConstruction | last post by:
Greetings all, I have a main form (frmClients) with two subforms (subVisits) (subAccount). I got the subforms to reflect what the main form is showing by linking master and child fields (I think--newbie here). Now I need the second subform (subAccount) to update when I add a visit in the subVisits subform. I assume that the AfterUpdate would do it, but I cant figure out what the code is to update another subform would be. Not...
11
4380
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store procedure(assume there are many columns in the table). I need to insert data into two separate tables, the relation between these two tables is 1 row of data in table1 could have multiple rows in table2 related to table1, but if the data insertion into...
1
1417
by: dakboyan | last post by:
Hiya guys, I have a problem here that ive can't seem to solve on my own or through searching around the forums here. I would be glad if someone could assist me. This is actually an events management database that im helping to create for my school. First up is the calculation part. The idea is simple...for any 1 EVENT there are multiple PUPILS that had participated. And these PUPILS are further divided by their respective CLASSES. ...
1
1988
by: Drum2001 | last post by:
Hello All, This seems like it would be simple. Is there a way to have an "After Update" event from Subform1 trigger an "add new record" on Subform2? I see posts to go from Mainform to Subform, but not subform to subform. Any suggestions would be greatly appreciated!
13
6229
by: BASSPU03 | last post by:
Hello, folks. This is my first post and I only began to work extensively with Access about 3 weeks ago. I'm running Access 2003 on Windows XP. I'd like a textbox in subform2 to reflect the value chosen from a combobox in subform1. FYI: Both of these subforms are linked to a main form with five fields (AutoNumber, Quantity, Resource, Type, and General Description; "AutoNumber" is the primary key). My main form lists a resource (e.g....
6
5069
by: Ian Norris | last post by:
Hi, I am trying to load a number of records into a subform "Schedule Codes" from form "Certif" using the followowing code. Do While Not RS.EOF With RS Forms!!! = !GroupNo Forms!!! = !Code Forms!!! = Now() Forms!!!.SetFocus DoCmd.GoToRecord , , acNewRec
1
4974
by: cathycros | last post by:
Hi, I'm trying to take data from varchar fields in one table and copy it to Nvarchar fields in another table. (Long story - now dealing with multiple languages, not enough space in row in current table for multiple Nvarchar fields...). I know how to insert new text into the Nvarchar fields: INSERT INTO tblNotes ( noteID, note ) SELECT 1, N'This is a unicode note' but the problem I'm having is when I'm pulling the text to insert from...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10108
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4064
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 we have to send another system
3
2894
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.