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

Updating A Form Text Box

Status
Not open for further replies.

SamDemon

Technical User
May 28, 2003
171
GB
I am trying to update a text box based on the value of combo box. I am trying to achieve the following:-

What I am trying to achieve is the following:-

If TradingStatus = A then ChargeID = 1
Else
If TradingStatus = NA then ChargeID = 2

Now I have put the code on the ChargeID text box on the after update event...

If Me.TradingStatus = "A" Then
Me.ChargeID.Value = 1
ElseIf Me.TradingStatus = "NA" Then
Me.ChargeID.Value = 2
End If


However nothing appears to be happening... could someone please point me in the right direction because the above looked correct to me.

Thanks

Sam


It's just common sense, shame sense isn't common!
 
ChargeID text box on the after update event"
Don't you mean the AfterUpdate event of the COMBObox??
Are you sure the combobox value is a "A" or "NA" and not the primary key of a record? Check the rowsource.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top