A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

'Forwarding' fields from one form to another



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2004, 09:07 PM
Phil Hood
external usenet poster
 
Posts: n/a
Default 'Forwarding' fields from one form to another

I've just started using access so forgive this really
basic question :-)

I am trying to create a database that has 1 main table and
4 other tables (and forms for each).

When I enter information into the first form (for the main
table), I am setting up command buttons that open the
other four forms (for the other tables) in order to add
additional information.

But, I want to 'carry forward' the basic information from
the main form/table into the other forms/tables so that
when the other four forms are displayed, they already
contain the info from the main form. Further, when I save
the data added through any of the other four forms, I want
to include the shared fields from the main form (e.g. the
primary key in the main table is a foreign key in the
other four tables amd I don't want to key it in again).

Does this make sense?

I hope so and I hope you can help.

Thanks (in hope)

Phil.
  #2  
Old May 30th, 2004, 11:55 PM
Turner
external usenet poster
 
Posts: n/a
Default 'Forwarding' fields from one form to another

Phil; there are several ways that work. However, I like
this one. On the "On Activate" event of the form that is
being opened place code that looks something like this:

me.ControlThatYouWishtoPopulate _
= Forms!TheFormthatDidtheOpening!ControlThatHasTheIn fo

Hope this Helps!


-----Original Message-----
I've just started using access so forgive this really
basic question :-)

I am trying to create a database that has 1 main table

and
4 other tables (and forms for each).

When I enter information into the first form (for the

main
table), I am setting up command buttons that open the
other four forms (for the other tables) in order to add
additional information.

But, I want to 'carry forward' the basic information

from
the main form/table into the other forms/tables so that
when the other four forms are displayed, they already
contain the info from the main form. Further, when I

save
the data added through any of the other four forms, I

want
to include the shared fields from the main form (e.g.

the
primary key in the main table is a foreign key in the
other four tables amd I don't want to key it in again).

Does this make sense?

I hope so and I hope you can help.

Thanks (in hope)

Phil.
.

  #3  
Old May 31st, 2004, 02:27 AM
John Vinson
external usenet poster
 
Posts: n/a
Default 'Forwarding' fields from one form to another

On Sun, 30 May 2004 13:07:52 -0700, "Phil Hood"
wrote:

I've just started using access so forgive this really
basic question :-)

I am trying to create a database that has 1 main table and
4 other tables (and forms for each).

When I enter information into the first form (for the main
table), I am setting up command buttons that open the
other four forms (for the other tables) in order to add
additional information.


Well... DON'T store the information redundantly in the related tables.

By far the simplest way to do this, usually, is to make the related
tables' forms Subforms on the main table. You can (for instance) put a
Tab Control on the form, and put a subform on each tab page. This will
let you see the "main table" data on the form in conjunction with each
related table's data in the subforms; the related tables would have a
foreign key linking them to the main table, and this field would be
used as the master/child link field.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.