Unanswered: display two tables on a form with tabs
I've read several threads about an issue that i'm having but i cannot resolve it.
I'm self taught access and VB coding. so if its conplex please send me arrows to what to search and display.
I'm using access 2013,
however the database needs to work in access 2003.
i have two tables:
CusID - unique primary
RawID - Unique Primary
CusID - Lookup link to table one CusID
I have one form where you can search for all the customers using a query. this displays in a subform on the same form.
double clicking on the CusID in the subform opens a second form (CusDetails).
this displays a second form(CusDetails) which displays all the customer details of the customer selected. It also displays a query via a subform that displayes all the orders placed by the customer.
I want to click on the [RawID] in this subform and open another form (CusOrders) that displays the specific order details in tabbed page.
I'm using the following code:
Private Sub RawID_DblClick (Cancel As Interger)
Dim stDocName As String
Dim stLinkCriteria As String
you actually should have a single record for CUSTOMER - subform (custorders) , to get the parent-child effect.
in the form that returns results from the search
put a button in the header so when the user picks a customer, click button , to open the 1 customer form, with subform(custorders)
DoCmd.OpenForm "frm1Cust", , , "[clientID]=" & txtID
This will ensure PARENT-CHILD integrity. The suborm can have tabs. The tab.change() event will swap dataset in the subform.
select case tab.value
subForm.form.sourceobject = "frmSubfrmCliOrders"