2 after updates

cardgunner

Registered User.
Local time
Today, 15:36
Joined
Aug 8, 2005
Messages
210
After the user selects and enters one value I want the values for two other fields set.

If I run these they seperately they both work

Code:
Private Sub actionid_AfterUpdate()

Me.Action.Value = DLookup("[actionname]", "actiontbl", "[actionid] = Forms![cstfrm]!commentfrm.form!actionid")


End Sub

Private Sub actionid_AfterUpdate()

Me.actionnumber.Value = DLookup("[noofdays]", "actiontbl", "[actionid] = Forms![cstfrm]!commentfrm.form!actionid")

End Sub

What do I need to do to tie the two together? Where they select the action id and it sets the actionname and the noofdays.
 
Private Sub actionid_AfterUpdate()

Me.Action.Value = DLookup("[actionname]", "actiontbl", "[actionid] = Forms![cstfrm]!commentfrm.form!actionid")
Me.actionnumber.Value = DLookup("[noofdays]", "actiontbl", "[actionid] = Forms![cstfrm]!commentfrm.form!actionid")

End Sub
 
What do I need to do to tie the two together? Where they select the action id and it sets the actionname and the noofdays.
I sure hope Paul has already answered this question... :)
 
I get a compile error: syntax error

Private Sub actionid_AfterUpdate() is in yellow
 
I have that fixed.

Thank you. It's funny I tried that before and I got an error. Run time error 2564 or 2540?

Hmm, it's working now thank you.
 

Users who are viewing this thread

Back
Top Bottom