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  

Navigation Buttons



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2006, 11:40 AM posted to microsoft.public.access.forms
Gary
external usenet poster
 
Posts: 3
Default Navigation Buttons

I have 2 tables.
tbl_Customer
tbl_Contact


I have created a form (frm_Customer) that contains the fields from
tbl_Customer. And within this form, I have a subform (subfrm_Contact) that
has fields from tbl_Contact.

The subform has a navigation buttons bar as does the form frm_Customer.
One customer may have several contacts associated with it.

Properties -- frm_Customer has a record source: qry_SrchCustomer
Properties -- subfrm_Contacts has a record source: qry_Contact

qry_SrchCustomer & qry_Contact has the 2 tables and their respective fields

tbl_Customers:
CustID (primary key)- autonumber
CustDate
CompName

tbl_Contacts:
ContactID (primary key)- autonumber
CustID
CompName
ContactName

The join properties between the 2 tables (link: CustID to CustID) in this
query a
"Include ALL records from tbl_Customer and only those records from
tbl_Contacts where the joined fields are equal."

In subfrm_Contact - I would add a new contact for a given customer. The
navigation buttons bar naturally acknowledges this addition by indicating
eg. 2 of 2.

PROBLEM: When this addition happens, I notice the navigation buttons bar
for frm_Customer also adds another record number to its count. The count for
this should always show 1 of 1 no matter how many additional contacts I add
(in subfrm_Contacts) for this 1 customer. Help.

Note: The relationships window has no links between the two tables. The
linking between the two only occurs in the query's mentioned above.




  #2  
Old June 26th, 2006, 12:30 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Navigation Buttons

Gary, if you open qry_SrchCustomer directly, you will see that it has one
record for every contract. The customer will appear 5 times if they have 5
contracts. That's because you are using a query with both tables.

Change the RecordSource of the main form to just tbl_Customers.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Gary" wrote in message
u...
I have 2 tables.
tbl_Customer
tbl_Contact


I have created a form (frm_Customer) that contains the fields from
tbl_Customer. And within this form, I have a subform (subfrm_Contact) that
has fields from tbl_Contact.

The subform has a navigation buttons bar as does the form frm_Customer.
One customer may have several contacts associated with it.

Properties -- frm_Customer has a record source: qry_SrchCustomer
Properties -- subfrm_Contacts has a record source: qry_Contact

qry_SrchCustomer & qry_Contact has the 2 tables and their respective
fields

tbl_Customers:
CustID (primary key)- autonumber
CustDate
CompName

tbl_Contacts:
ContactID (primary key)- autonumber
CustID
CompName
ContactName

The join properties between the 2 tables (link: CustID to CustID) in this
query a
"Include ALL records from tbl_Customer and only those records from
tbl_Contacts where the joined fields are equal."

In subfrm_Contact - I would add a new contact for a given customer. The
navigation buttons bar naturally acknowledges this addition by indicating
eg. 2 of 2.

PROBLEM: When this addition happens, I notice the navigation buttons bar
for frm_Customer also adds another record number to its count. The count
for this should always show 1 of 1 no matter how many additional contacts
I add (in subfrm_Contacts) for this 1 customer. Help.

Note: The relationships window has no links between the two tables. The
linking between the two only occurs in the query's mentioned above.



 




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 01:00 PM.


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