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
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