After Update Question

elliot315

Mr. Question
Local time
Today, 12:49
Joined
Jun 3, 2007
Messages
98
I have a text (amount) in a subform that must be updated in two ways
it checks for the type of service (this text is in the same subform) and the position of the employee (this text is in the form)
Example
if the service is A it doesn't matter the position the amount will be $65, but if the service is B and the position of the Employee is President the amount is $80, everyone else the amount will be $65
how do I code this situation?
Form name is frmInformacionPersonal
subForm name is sbfrmServicio

Position text name is Cargo (in the form)
Service text name is Servicio (in the subForm)

I did the one for Service A
but for Service B no... any help?
 
Try this code:

If Me.Position = "President" and Me!Subform!Service = "B" then
Me!Subform!Amount = 80
Else
Me!Subform!Amount = 65
End If

This is code (as written) need to be triggered from the main form,
perhaps in the afterupdate event of a combo box where you select
an employee.

You'll need to substitute your own form name and subform name.
 
Thanks... but it has to be triggered from the subform... I'll try to adapt this to my needs.. thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom