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  

Using Access 2003



 
 
Thread Tools Display Modes
  #1  
Old November 20th, 2009, 08:31 PM posted to microsoft.public.access.forms
Jennifer
external usenet poster
 
Posts: 557
Default Using Access 2003

I have one table called customers and a table called orders. The primary Key
is CustomerID and the foriegn key is attached to Orders. I then created and
orders and customer forms. I want it so that when I have a Customer name on
the first form I only want orders from that customer to show up on the orders
form. I have tried creating a 1 to many relationship. That did not work for I
deleted. I did a insert a subdatasheet but it only saved that first
cumstomer's information. Please help? Jennifer
  #2  
Old November 21st, 2009, 12:30 AM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Using Access 2003

Jennifer,
Use a Form/SubForm arrangement and use queries of your tables rather than
directly to the tables. The LinkChild/MasterFields of the SubFormControl will
be the CustomerID.

Jennifer wrote:
I have one table called customers and a table called orders. The primary Key
is CustomerID and the foriegn key is attached to Orders. I then created and
orders and customer forms. I want it so that when I have a Customer name on
the first form I only want orders from that customer to show up on the orders
form. I have tried creating a 1 to many relationship. That did not work for I
deleted. I did a insert a subdatasheet but it only saved that first
cumstomer's information. Please help? Jennifer


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1

  #3  
Old November 21st, 2009, 12:41 AM posted to microsoft.public.access.forms
Tom van Stiphout[_3_]
external usenet poster
 
Posts: 10
Default Using Access 2003

Hi Jennifer,
You may want to search your harddrive for Northwind.mdb; it has exactly the
same scenario you are speaking of. Dissect it, and you can learn quite a bit
on how to setup tables and their relationships, and then build forms on top
of that.

-Tom.
Microsoft Access MVP

"Jennifer" wrote:

I have one table called customers and a table called orders. The primary Key
is CustomerID and the foriegn key is attached to Orders. I then created and
orders and customer forms. I want it so that when I have a Customer name on
the first form I only want orders from that customer to show up on the orders
form. I have tried creating a 1 to many relationship. That did not work for I
deleted. I did a insert a subdatasheet but it only saved that first
cumstomer's information. Please help? Jennifer

  #4  
Old November 21st, 2009, 12:43 AM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Using Access 2003

You need to create the 1 to many relationship between table called customers
and a table called orders with the primary Key CustomerID and the foriegn key
in Orders. Select options Referential Integerity and Cascade Update.

If you can not set the relations due to error it will be that you have one
or more records in the Orders table that does not have a matching CustomerID.

Run an 'unmatched' query to find and fix the records. Complete setting the
relationship.

Use a form/subform for customer/orders with Master/Child links with
CustomerID.

CustomerID does not need to be shown on the subform. As you add a new record
in the subform the CustomerID will automatically inserted in the Orders table.

Scrolling through the Customers in the main form you only see the orders
related to that Customer shown on the main.

--
Build a little, test a little.


"Jennifer" wrote:

I have one table called customers and a table called orders. The primary Key
is CustomerID and the foriegn key is attached to Orders. I then created and
orders and customer forms. I want it so that when I have a Customer name on
the first form I only want orders from that customer to show up on the orders
form. I have tried creating a 1 to many relationship. That did not work for I
deleted. I did a insert a subdatasheet but it only saved that first
cumstomer's information. Please help? Jennifer

 




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 02:37 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.