Remember last input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

win XP and office 2003
I have a text box (memo) that I am entereing data into on a continuous form
called [ItemNote].

I am currently inserting data into that field based on the data typed into
another field on the form. For some reason, when the data is put into this
field via this autoamtic method it won't copy that information to a new
record using the following code:

Private Sub itemNote_AfterUpdate()
'copies the last note entered to the new record
Me!itemNote.DefaultValue = """" & Me!itemNote & """"
End Sub

However, when I type data in manually - it will remember. How can I get
this data to copy to new records when the data is not typed in but inserted
using code?
 
I apologize for the rookie question, but what do you mean "insert using code"
proceedure?

Duane Hookom said:
Add a call to itemNote_AfterUpdate() in your "inserted using code"
procedure.

--
Duane Hookom
MS Access MVP
--

BLTibbs said:
win XP and office 2003
I have a text box (memo) that I am entereing data into on a continuous
form
called [ItemNote].

I am currently inserting data into that field based on the data typed into
another field on the form. For some reason, when the data is put into
this
field via this autoamtic method it won't copy that information to a new
record using the following code:

Private Sub itemNote_AfterUpdate()
'copies the last note entered to the new record
Me!itemNote.DefaultValue = """" & Me!itemNote & """"
End Sub

However, when I type data in manually - it will remember. How can I get
this data to copy to new records when the data is not typed in but
inserted
using code?
 
BLTibbs said:
win XP and office 2003
I have a text box (memo) that I am entereing data into on a continuous form
called [ItemNote].

I am currently inserting data into that field based on the data typed into
another field on the form. For some reason, when the data is put into this
field via this autoamtic method it won't copy that information to a new
record using the following code:

Private Sub itemNote_AfterUpdate()
'copies the last note entered to the new record
Me!itemNote.DefaultValue = """" & Me!itemNote & """"
End Sub

However, when I type data in manually - it will remember. How can I get
this data to copy to new records when the data is not typed in but inserted
using code?


The events do not fire when you use VBA to manipulate a
control's value.

Set the DefaultValue in the procedure that inserts the data.
 
You mentioned "insert using code" in your original posting. This is where
you need to write or call code that sets the default value.

--
Duane Hookom
MS Access MVP
--

BLTibbs said:
I apologize for the rookie question, but what do you mean "insert using
code"
proceedure?

Duane Hookom said:
Add a call to itemNote_AfterUpdate() in your "inserted using code"
procedure.

--
Duane Hookom
MS Access MVP
--

BLTibbs said:
win XP and office 2003
I have a text box (memo) that I am entereing data into on a continuous
form
called [ItemNote].

I am currently inserting data into that field based on the data typed
into
another field on the form. For some reason, when the data is put into
this
field via this autoamtic method it won't copy that information to a new
record using the following code:

Private Sub itemNote_AfterUpdate()
'copies the last note entered to the new record
Me!itemNote.DefaultValue = """" & Me!itemNote & """"
End Sub

However, when I type data in manually - it will remember. How can I
get
this data to copy to new records when the data is not typed in but
inserted
using code?
 
Back
Top