Update a memo subform

  • Thread starter Thread starter NHiorns
  • Start date Start date
N

NHiorns

I would like to have an input box for typing in
miscellaneous information and then have an Insert button
to add this to a subform (although doesn't really need to
be a subform). When click Insert button it will need to do
3 things, take the information from the input box and
paste into Subform, insert a date/time stamp before or
after the inserted infomation and finally clear the input
box.

The subform needs to keep a record of all inserted data
i.e. when click insert button, it doesn't erase any
information already there. Also, if possible make the
subform non-editable, except via input box.

I realise this is quite a large task, so if anyone can
give me any pointers or downloadible examples I would
appreciate it.
 
NHiorns said:
I would like to have an input box for typing in
miscellaneous information and then have an Insert button
to add this to a subform (although doesn't really need to
be a subform). When click Insert button it will need to do
3 things, take the information from the input box and
paste into Subform, insert a date/time stamp before or
after the inserted infomation and finally clear the input
box.

The subform needs to keep a record of all inserted data
i.e. when click insert button, it doesn't erase any
information already there. Also, if possible make the
subform non-editable, except via input box.


If you don't have a another reason to use a subform, you
can do this with just a text box. Set the text box's Locked
property to Yes to prevent users from editing it. The code
behind your Insert button would be something like this air
code:

Dim strMiscInfo As String
strMiscInfo = InputBox("Enter Miscelleanous Info")
If strMiscInfo <> "" Then
Me.Text0 = (Me.Text0 + vbCrLf) & Now & " " & strMiscInfo
Me.Repaint
End If
 
NHiorns said:
I am probably missing the obvious, but what do I use as an
InputBox?


Only obvious when you know about it ;-)

InpuBox is a built-in function (see Help).
 
Easy when you know how :)

Thanks that's just what I needed and not nearly as complex
as I first thought.
 
Back
Top