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

After Update in field on form 1

Status
Not open for further replies.

monkeysee

Programmer
Sep 24, 2002
201
US
I would like to trigger an after update event to populate a field when a certain value of another field is chosen.

The choice field is a combo box. When the user chooses "Write-off" from the drop down, I would like to have the field "InsPayment" to be populated with "0". The InsPayment field is formatted as currency.

So in the AfterUpdate event procedure of the 'Write-off" field, I have the following, which I know is incomplete...and I need help in completing it

Code:
If [PaymentMethod]="write-off" then [InsPayment]= "0"

Thank you in advance for all the help anyone can give. People on this site are awesome in assisting us 'dabblers'!
 
I would try code like:

Code:
If Me.[PaymentMethod]="write-off" then 
   Me.[InsPayment]= 0
End If


Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Thank you Duane,
I used your suggestion, and the after update trigger did not trigger any outcome.
Are we missing something?
Thanks!
 
I would place a breakpoint on the "If ..." line and hover over the PaymentMethod reference to see what the actual value might be. Can you provide the Row Source and datasheet view of the Row Source? Are you sure there isn't some type of primary key ID/code that is being used?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Duane,
Thank you for your guidance and help! Yes there is a primary # assigned to the write-off. When I changed that in the code, it all works!

Thanks again for your generosity in sharing your knowledge!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top