Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing a form from a subform in a tab control

Status
Not open for further replies.

akinia

Programmer
Nov 23, 2000
69
BE
Hi every body

I've got a little problem with my form ("frm_Company").
It is divided in two parts:
- first one is filled with some text fields over the company.
- second one is filled with a tab control and give informations about contact persons.
On this tab control there is also a form ("frm_ContactPerson") which contains some text fields linked to a subform.
The subform displays in a datasheet few informations about the contact person, like his surname, firtsname, phone number, email address.
More details can be seen from the text fields.
The purpose is when I go to the next record in the datasheet, I have to see the same information in the text fields with some more.
When I test only the form the code works fine, but when I run from "frm_Company" I get an error message like this one:
" Run time error '2489'
The object "frm_ContactPerson" isn't open"

Here is the code in the subform:
Private sub Form_click()

Dim int_NumContact as Integer

int_NumContact = CurrentRecord
DoCmd.GoToRecord acDataForm, "frm_ContactPerson", acGoTo, int_NumContact

End Sub

Any suggestion will be appreciated.

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top