What is the last occuring EVENT in a form...

everblue

Registered User.
Local time
Today, 12:01
Joined
Jul 20, 2002
Messages
21
I have a form containing three text boxes.
1. ID - Autonumber
2. Item_Name - Text
3. Item_Num - Text

Some of the Items have Item_Num, while some of them not.
I have designed a form containg all these three controls on it. Now What I want is: If the user leaves the Item_Num field blank, it should be filled with the value of ID (Autonumber). I know how to place the value by coding like:
Me.Item_Num.setfocus
if len(me.item_num.text)=0 then
me.item_num.text=me.ID.text
endif

My only problem is finding the right EVENT to write this code in. The event should be the last occuring event of the form while saving this record and moving to the other. I used BeforeInsert, but it is the first ocurring event when u type in a form.
Waiting for your reply.....:confused:
 
It is not the last event of the form.

When u start typing on a text box, Before_Update() is triggered.

Didn't work :(
 

Users who are viewing this thread

Back
Top Bottom