auto insert value to field when form opens

antonyx

Arsenal Supporter
Local time
Today, 13:35
Joined
Jan 7, 2005
Messages
556
how can i insert 'thisvalue' into 'thisfield' as soon as the form is opened??
 
Easiest way is to set the default value of the text box.
If for some reason you don;t want to do it this way, then set up an event procedure on open of the form. This will need to say:
thisfield.value = "thisvalue"
 
Use a default on table or form level.

RV
 
i had problems with using default values however.. eg

i had one field with a default value (done through table level).. and when my user accidentally deleted the value completely from the form, the record didnt display on the report! which was very very bad!
 
i tried this
Code:
Private Sub Form_Open(Cancel As Integer)
jobtype.Value = "ACCT"
End Sub
and it told me i cannot assign a value to that object. so i right clicked the field and put ACCT in the default value, but when the form opened it was just blank
 
it works, please move on with your lives, thank you
 

Users who are viewing this thread

Back
Top Bottom