* iKey holds the parameter of the of the p-view JobView ThisForm.iKey = INT(VAL(SUBSTR(Node.Key, 5))) REQUERY("JobView") SELECT "JobView" ThisForm.PageFrame1.ActivePage = 4 ThisForm.PageFrame1.Page4.Refresh()In the .Activate of the page the following code populates the comboboxes
WITH This && Form.PageFrame1.Page4 * Customer Listbox SELECT ; Customer.CustName, Customer.CustId; FROM ShopTrack!Customer; ORDER BY Customer.CustName; INTO ARRAY .cboCustomer.laData IF _TALLY = 0 DIMENSION .cboCustomer.laData[1,1] STORE "No Customers" TO .cboCustomer.laData ENDIF * Contact Listbox SELECT ; ALLTRIM(Contacts.LName) + ', ' + ALLTRIM(Contacts.FName) AS ContName,; Contacts.ContId; FROM ShopTrack!Contacts; WHERE Contacts.CustId = INT(VAL(.cboCustomer.List(.cboCustomer.ListIndex, 2))); ORDER BY ContName; INTO ARRAY .cboContact.laData IF _TALLY = 0 DIMENSION .cboContact.laData[1,1] STORE "No Contacts" TO .cboContact.laData ENDIF ENDWITH
Valid empty on both InteractiveChange Customer cbo WITH This.Parent lnCustId = INT(VAL(This.List(This.ListIndex, 2))) DIMENSION .cboContact.laData[1,1] SELECT ; ALLTRIM(Contacts.LName) + ', ' + ALLTRIM(Contacts.FName) AS ContName,; Contacts.ContId; FROM ShopTrack!Contacts; WHERE Contacts.CustId = lnCustId; ORDER BY ContName; INTO ARRAY .cboContact.laData IF _TALLY = 0 STORE "No Contacts" TO .cboContact.laData ENDIF .cboContact.Requery() .cboContact.ListIndex = 1 ENDWITH BountColumn 2 on both BoundTo .t. on both ControlSource jobview.custid and jobview.contid RowSourceType array RowSource (or code that fills it) see aboveThanks so much for your help