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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|