add textbox data to new record without using control source

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..
 
S

Sam D

Add something like...

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

to the after update event of the textbox.

HTH
Sam
 
A

adrian

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
 
S

Sam D

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top