add textbox data to new record without using control source

  • Thread starter Thread starter adrian
  • Start date Start date
A

adrian

how do i add info in textbox with out connecting textbox
to control source.

I need to input same data to textbox then every time i
enter a new record i need same data to recorded.

same question asked different?

How do i set the defaultvalue property of each
field to the value of that field in the last saved record.

whenever i add new record, i want one field(studentID)
copy same as previous record and rest field i can enter
myself..
 
Add something like...

StudentID.DefaultValue="'" & StudentID & "'"

to the after update event of the textbox.

HTH
Sam
 
trying to understand how this works

when i go to new record, how do i input same record
without doing anything?

example:
from the Form txtStuID-box
record(1), i enter 000001 to txtStuID then enter
record(2), I want same 000001 to be recorded on StudentID
field
 
If your textbox bound to the StudentID field is called txtStuID then in this
textbox's after update event you add...

txtStuID.DefaultValue="'" & txtStuID & "'"

This sets the default value for the textbox txtStudID to the last value,
hence when a new record is next created it will contain the new default
value. You need to surround the text with quotes, hence the "'" & bits.

HTH
Sam
 
Back
Top