473,659 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Carry over data fields from one form to another...

I have a simple problem, i just can get a grasp on it. I designed a
database for inventory of computer equipment. Now i created forms for
each table. Each piece of equipment is going to come in an order.
ORDERS --> ORDER CONTENTS --> DEVICES --> CPUS
--> PRINTERS
--> NETWORK HARDWARE

You get the picture. I want to make the updating easy. I start from
ORDERS table enter all the common information, then ORDER CONTENTS
table and get all that information in, and then i enter the
information for each specific device, and then the details on
different devices. I made a button on each form to go from one to the
other and thus it creates a new record for me in that table.

The question:

What i want to do is have the form ORDERS carry over the order number
(pk) to the next table i update, thus ORDER CONTENTS...and then i want
DEVICES table to carry over pc number to the next form, so it cuts
down on typing and it cuts down on possible errors user can
make...would anyone have any input i could use. Thank you so much...
Nov 12 '05 #1
2 8978
DFS
Almir,

Sounds like each successive form opened is dependent on an ID of some type
from the
calling form?

So base the recordsource of the forms on a query which pulls data based on
the ID(s).

Main form recordsource: SELECT * FROM ORDERS;
2nd form recordsource: SELECT * FROM ORDER_CONTENTS WHERE OrderID =
Forms.MainForm. OrderID;
3rd form recordsource: SELECT * FROM DEVICES WHERE OrderID =
Forms.MainForm. OrderID AND ContentID = Forms.ContentFo rm.ContentID;
..... so on

These SELECTS depend on your db structure.
In the form control fields, you'll need to set some default values for the
foreign key that refer to the calling forms.

Default value in OrderID field on 2nd form: Forms.MainForm. OrderID
Default value in OrderID field on 3rd form: Forms.MainForm. OrderID
Default value in ContentID field on 3rd form: Forms.ContentFo rm.ContentID

Depending on your database structure, you may not need two defaults on your
3rd form.


"Almir" <al*****@yahoo. com> wrote in message
news:72******** *************** ***@posting.goo gle.com...
I have a simple problem, i just can get a grasp on it. I designed a
database for inventory of computer equipment. Now i created forms for
each table. Each piece of equipment is going to come in an order.
ORDERS --> ORDER CONTENTS --> DEVICES --> CPUS
--> PRINTERS
--> NETWORK HARDWARE

You get the picture. I want to make the updating easy. I start from
ORDERS table enter all the common information, then ORDER CONTENTS
table and get all that information in, and then i enter the
information for each specific device, and then the details on
different devices. I made a button on each form to go from one to the
other and thus it creates a new record for me in that table.

The question:

What i want to do is have the form ORDERS carry over the order number
(pk) to the next table i update, thus ORDER CONTENTS...and then i want
DEVICES table to carry over pc number to the next form, so it cuts
down on typing and it cuts down on possible errors user can
make...would anyone have any input i could use. Thank you so much...



Nov 12 '05 #2
al*****@yahoo.c om (Almir) wrote in message news:<72******* *************** ****@posting.go ogle.com>...
"Squirrel" <wi*****@covad. net> wrote in message news:<83******* *************** ***@msgid.megan ewsservers.com> ...
If you have a parent/child relationship between each of these tables, could
you
accomplish your goals by using subforms?

-L

No i can't use subforms, i already have subforms on each one of those
calling forms.


Looks like you might have to do something like a DCount to see if the
ID in question is already in your "child" table (I'm using "child"
somewhat loosely here... in the "subsequent " tables you'd carry the
Unique ID to). If it doesn't exist, you could open the form in
question and insert a new value. Just open the next form and assign
the value from the calling form...

In Form1
DoCmd.OpenForm "Form2"
Forms!Form2!IDF ield=Forms!Form 1!IDField

or some such thing.
Nov 12 '05 #3

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

Similar topics

1
4189
by: ij | last post by:
Hi, I'm trying to submit an image object, along with some other text fields to another web server from within an ASP page but am stuck on getting the image to be submitted with the form. In a bit more detail: 1. When this particular page is executed, I want the server to pull an image from a db (stored as a BLOB) along with a few other text fields. This part is easy and I have no problems with it.
1
1759
by: David | last post by:
Hi, I have an ASP page with a form and the following code: ..... type=Radio Checked name=selectserial value=" & RS("PSL_F_Serial")..... Tis will carry over the value of RS("PSL_F_Serial"), but I also have another value which needs to be carried (2 values per radio button), RS("PSL_L_Serial").
32
3216
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being lost when they move to a new record. This seems to be the case when there are multiple users. When there is a single user using it, we don't seem to have that problem. It seems that we had this problem when we first converted from an MDB back end...
7
2213
by: John | last post by:
Hi, I'm sure this has been asked and answered before but I lost it. How does one code a form to carry forward the only certain fields from the previous record. Thanks.
1
3544
by: meganrobertson22 | last post by:
hi everybody- what is the best way to add data from one form to another? i have 2 tables: person and contract. here are some of the fields. table: person personid (autonumber and primary key) ss#
7
1433
by: gordon | last post by:
Hi, I have a series of forms that collect information from a user. When I write out my information to a text file after the last file, the values of the previous forms seem to be blank. I would like to retain the values of names.textbox1.text and names.textbox2.text for the output file. Any help greatly appreciated.
5
3940
by: campbellbrian2001 | last post by:
I'm trying to get the "Carry data over to new record" code to work from Allen Browne's site: http://allenbrowne.com/ser-24.html I follwed the instruction explicitly and somethings not working... any clues? Thanks all!! Brian
0
1125
by: hellopraveen30 | last post by:
Here is my form lap and i want to submit data of this form to another form ("http://www.lapkokcasuals.net/jobs/Apply.aspx") without going their how can i do it ihave written these code below data is submitted but where it is goin i dont know.please help me and give some reponses. Imports System.Object 'Imports System.IO Imports System.Data Imports System.Data.SqlClient Imports System.IO.IOException Imports foxtrot.xray.WebRobot Imports...
1
1613
by: aaronkm | last post by:
Hello thescripts!, I hope this is easy for someone to answer, I just can't seem to figure it out. On my main form, within a Tab Control I have a ComboBox named: GapArea that is filtered by three other ComboBox selections; Tier 1, Tier 2, Tier 3 I am using a notonlist event procedure as coded below: Private Sub GapArea_NotInList(NewData As String, Response As Integer) Dim Result Dim Msg As String
0
8850
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
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
8626
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
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
6178
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
4175
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...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
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

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.