D
Douglas
I have a form which has a Tab control with 2 pages on it.
On Page 1 I have a sub-form with selected data taken from the Page 2
Then when the user clicks a record on the subform on Page 1 , it opens
up page 2 and jumps to the correct record.
My scenario is like this
(you need a courier font to display it)
-----------------
|Customer|Invoices|
| |________|___________________
| |
| Cust No. ____________ |
| Cust Name | Inv. No.s | |
| |------------| |
| Cust Addr | xxxx | |
| etc etc | xxxx | |
| xxxxxxxxx | xxxx | |
| xxxxxxxxx | xxxx | |
| xxxxxxxxx ------------ |
| xxxxxxxxx |
-------------------------------------
Page 1 contains customer details and Page 2 contains the customer
Invoice details. One Customer -> Many Invoices with Cust No as the
Key.
The subform (continous forms) on Page 1 (Customer) contains only
Invoice numbers which
when clicked , i want to jump to Page 2 (Invoices) and locate and
display the invoice details.
Can anyone tell me the Click Event code i need to jump to a specific
record when an invoice number is clicked on the subform.
I use:
Forms![Customer].TabCtl.Value = 1
to jump to the Invoices Page but what code can i use to locate the
record.
i tried
DoCmd.GoToRecord acDataForm, "Invoices", acGoTo, 2
just as a test to jump to record 2 but it errors with
Run-time erorr '2489'
The object 'Invoices' isn't open.
even though the form is open at the time the line of code is executed.
Id really appreciate any help here
TIA
Doug
On Page 1 I have a sub-form with selected data taken from the Page 2
Then when the user clicks a record on the subform on Page 1 , it opens
up page 2 and jumps to the correct record.
My scenario is like this
(you need a courier font to display it)
-----------------
|Customer|Invoices|
| |________|___________________
| |
| Cust No. ____________ |
| Cust Name | Inv. No.s | |
| |------------| |
| Cust Addr | xxxx | |
| etc etc | xxxx | |
| xxxxxxxxx | xxxx | |
| xxxxxxxxx | xxxx | |
| xxxxxxxxx ------------ |
| xxxxxxxxx |
-------------------------------------
Page 1 contains customer details and Page 2 contains the customer
Invoice details. One Customer -> Many Invoices with Cust No as the
Key.
The subform (continous forms) on Page 1 (Customer) contains only
Invoice numbers which
when clicked , i want to jump to Page 2 (Invoices) and locate and
display the invoice details.
Can anyone tell me the Click Event code i need to jump to a specific
record when an invoice number is clicked on the subform.
I use:
Forms![Customer].TabCtl.Value = 1
to jump to the Invoices Page but what code can i use to locate the
record.
i tried
DoCmd.GoToRecord acDataForm, "Invoices", acGoTo, 2
just as a test to jump to record 2 but it errors with
Run-time erorr '2489'
The object 'Invoices' isn't open.
even though the form is open at the time the line of code is executed.
Id really appreciate any help here
TIA
Doug