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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If then Else

Status
Not open for further replies.

jlg5454

Technical User
Jan 6, 2005
98
US
I need a field to say Bank 1 if opt 1 is selected or bank 2 if opt 2 is selected. I can not seem to get this to work.

Private Sub txtwho2_BeforeUpdate(Cancel As Integer)
If optwho = 1 Then
txtwho2 = "Bank 1"
Else: txtwho2 = "Cardella"
End If

End Sub

Thanks for any help
 
I don't think you may change the value of a control in its own BeforeUpdate event procedure ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Sorry, I'm a novice. So your saying I should do this in perhaps the optwho control's after update.
 
Or its click event.

"Time flies like an arrow; fruit flies like a banana."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top