
July 9th, 2004, 06:19 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Location: Haiti and Milano(italy)
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
custom event in access form
Front End Access Project, Back End SQL2000
I have a form (frmCustomer) that is bound to the table tblCustomer:
Customer_Id Autonumber
Customer_Name String
ContactPrincipal_Id int FK to tblContact
ContactAdministrative_Id int FK to tblContact
ContactTechnical_Id int FK to tblContact
the form has 3 additional unbound text boxes
txtContactPrincipal, txtContactAdministrative, txtContactTechnical
each of these text boxes displays a 4 lines string with the combined information about the contact.
This is done using a stored procedure call to the tblContact that will return this string as Parameter
and 3 buttons
cmdContactPrincipalMaintenance, cmdContactAministrativeMaintenance, cmdContactTechnicalMaintenance.
Clicking of either one of these buttons will open an unbound frmContact form passing as argument the value of the contact_Id.
On opening this form check the contact_id
if >1 use code to update the contact data
if=0 use code to create a new record and collect the ne Id
Up to here I have no proble.
THE PROBLEM
When clickig OK on the Contact form the application must:
1) Pass the control back to the Customer form indicatind the Contact Id
2) Close the Contact form
3) Update the FK on the Customer table
HELP NEEDED
I cannot devise a way to give control back to the Customer form passing the parameter
I tough that an elegant way out will be to have a custom event in the Customer form that will trigger on closing of the Contact form.
Is this possible?
How to do it?
Any suggestion is apreciated.
|