I have a text box in a form that I want to feed into a memo box on the same
form I am having trouble getting this to work in VBA. I imagine that the user
would type their sentance or not in the text box and then click a button and
it would appear in the memo with a time tamp and the sentance. if they did a
new sentance and clicked again it would add to the memo on a new line and
keep any old info. ANy ideas?
|
|
0
|
|
|
|
Reply
|
Utf
|
5/7/2010 4:52:14 PM |
|
Me.MyMemoField = Me.MyMemoField & _
IIf(Len(Nz(Me.MyMemoField, vbNullString)) > 0, vbCrLf, vbNullString) & _
Me.MyTextField
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)
"jwebster1979" <jwebster1979@discussions.microsoft.com> wrote in message
news:2680366B-CEA2-4B7B-8362-559AA35359F0@microsoft.com...
>I have a text box in a form that I want to feed into a memo box on the same
> form I am having trouble getting this to work in VBA. I imagine that the
> user
> would type their sentance or not in the text box and then click a button
> and
> it would appear in the memo with a time tamp and the sentance. if they did
> a
> new sentance and clicked again it would add to the memo on a new line and
> keep any old info. ANy ideas?
|
|
0
|
|
|
|
Reply
|
Douglas
|
5/7/2010 5:08:27 PM
|
|
On Fri, 7 May 2010 09:52:14 -0700, jwebster1979
<jwebster1979@discussions.microsoft.com> wrote:
>I have a text box in a form that I want to feed into a memo box on the same
>form I am having trouble getting this to work in VBA. I imagine that the user
>would type their sentance or not in the text box and then click a button and
>it would appear in the memo with a time tamp and the sentance. if they did a
>new sentance and clicked again it would add to the memo on a new line and
>keep any old info. ANy ideas?
If you have some table with many notes, and you want each note timestamped
(and perhaps you also want the notewriter identified), I'd really strongly
suggest a different approach. It's hard to search or sort data in big memo
fields, and just dumping a lot of disparate information into a memo makes it
difficult to work with!
Consider instead having a one to many relationship to a Notes table, with a
foreign key to this table; a NoteTime, default value =Now() to automatically
timestamp it; a Text or Memo field for the note text; and perhaps a NoteBy
field for the author's name or logon ID. You could then have a Subform based
on this notes table.
--
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
5/7/2010 5:36:40 PM
|
|
Thankyou that works great one more question. I also want a check box that
will turn the text red for a specific note and hold that color to draw
attention to to it. Or if it is not checked the text will be black and hold
that color. Let me know if you know how to do that. Either way I appreciate
your help!!
"Douglas J. Steele" wrote:
> Me.MyMemoField = Me.MyMemoField & _
> IIf(Len(Nz(Me.MyMemoField, vbNullString)) > 0, vbCrLf, vbNullString) & _
> Me.MyTextField
>
> --
> Doug Steele, Microsoft Access MVP
> http://www.AccessMVP.com/DJSteele
> (no e-mails, please!)
>
> "jwebster1979" <jwebster1979@discussions.microsoft.com> wrote in message
> news:2680366B-CEA2-4B7B-8362-559AA35359F0@microsoft.com...
> >I have a text box in a form that I want to feed into a memo box on the same
> > form I am having trouble getting this to work in VBA. I imagine that the
> > user
> > would type their sentance or not in the text box and then click a button
> > and
> > it would appear in the memo with a time tamp and the sentance. if they did
> > a
> > new sentance and clicked again it would add to the memo on a new line and
> > keep any old info. ANy ideas?
>
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
5/7/2010 10:36:01 PM
|
|
Turn all of the text red or black? Look into Conditional Formatting.
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/djsteele
(no e-mails, please!)
"jwebster1979" <jwebster1979@discussions.microsoft.com> wrote in message
news:9A419696-1C64-4FE0-A4EE-033F7D73A56B@microsoft.com...
> Thankyou that works great one more question. I also want a check box that
> will turn the text red for a specific note and hold that color to draw
> attention to to it. Or if it is not checked the text will be black and
> hold
> that color. Let me know if you know how to do that. Either way I
> appreciate
> your help!!
>
>
> "Douglas J. Steele" wrote:
>
>> Me.MyMemoField = Me.MyMemoField & _
>> IIf(Len(Nz(Me.MyMemoField, vbNullString)) > 0, vbCrLf, vbNullString) &
>> _
>> Me.MyTextField
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://www.AccessMVP.com/DJSteele
>> (no e-mails, please!)
>>
>> "jwebster1979" <jwebster1979@discussions.microsoft.com> wrote in message
>> news:2680366B-CEA2-4B7B-8362-559AA35359F0@microsoft.com...
>> >I have a text box in a form that I want to feed into a memo box on the
>> >same
>> > form I am having trouble getting this to work in VBA. I imagine that
>> > the
>> > user
>> > would type their sentance or not in the text box and then click a
>> > button
>> > and
>> > it would appear in the memo with a time tamp and the sentance. if they
>> > did
>> > a
>> > new sentance and clicked again it would add to the memo on a new line
>> > and
>> > keep any old info. ANy ideas?
>>
>>
>> .
>>
|
|
0
|
|
|
|
Reply
|
Douglas
|
5/8/2010 12:20:04 AM
|
|
On Fri, 7 May 2010 15:36:01 -0700, jwebster1979
<jwebster1979@discussions.microsoft.com> wrote:
>Thankyou that works great one more question. I also want a check box that
>will turn the text red for a specific note and hold that color to draw
>attention to to it. Or if it is not checked the text will be black and hold
>that color. Let me know if you know how to do that. Either way I appreciate
>your help!!
If you have all the data in one single big memo field, this will be difficult.
At the best you'll need to make it a Rich Text textbox (which will make it
even *more* difficult to search), with either manual selection of the text you
want to see in red or some REALLY complex VBA code. It would be much easier if
each note were in a separate record - then you could use conditional
formatting.
--
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
5/8/2010 1:07:54 AM
|
|
|
5 Replies
267 Views
(page loaded in 0.101 seconds)
Similiar Articles: Start new line in Memo Field - microsoft.public.access.formscoding ...In Design View, for your memo field's text box, goto Properties -- Other and set Enter Key Behavior to "New Line in Field" -- There's ALWAYS more than one way to skin ... How to enter multiple RTF lines in memo text box - microsoft ...How do I enable a user to line feed to a new, additional line to be entered in a form's text box which has a Memo field with Rich Text as its Contro... New Line in the default value of a text box in form - microsoft ...... Sarah, I'm not really convinced that poking lots of info into a memo is the ... Always use a multi-line text box if new-line characters are valid input. ... is a label or ... Enter new line in rich text memo field - microsoft.public.access ...How to enter multiple RTF lines in memo text box DataBase How do I enable a user to line feed to a new, additional line to be entered in a form's text box which has a Memo ... Memo Box Resize in Form View - microsoft.public.access.formscoding ...Start new line in Memo Field - microsoft.public.access.formscoding ... Memo Box Resize in Form View - microsoft.public.access.formscoding ... Start new line in Memo Field ... Next line in memo (text) field - microsoft.public.access ...How to enter multiple RTF lines in memo text box - microsoft ... Next line in memo (text) field - microsoft.public.access ... Enter new line in rich text memo field ... to ... Add text to Memo field - microsoft.public.access.formscoding ...If you check the box the on lick event adds text to a memo field. This issue is the last ... to Memo field - microsoft.public.access ... Enter new line in rich text memo ... Text in Access memo field - microsoft.public.access.forms ...Enter new line in rich text memo field - microsoft.public.access ... Hi there, I'm ... text box in report is truncating memo field at 255 characters ... I've got a text box in ... tabs in memo field - microsoft.public.accessEnter new line in rich text memo field - microsoft.public.access ... tabs in memo field ... How to enter multiple RTF lines in memo text box - microsoft ... tabs in memo field ... Count lines in text box - microsoft.public.access.forms ...... text box based of number of lines ... text box to write comments (data type is memo). You >> > can >> > write 10 lines ... New Line in the default value of a text box in ... New line in memo box DataBase - DataBase Discussion List Tuesday ...I have a text box in a form that I want to feed into a memo box on the same form I am having trouble getting this to work in VBA. I imagine that the user Start new line in Memo Field - microsoft.public.access.formscoding ...In Design View, for your memo field's text box, goto Properties -- Other and set Enter Key Behavior to "New Line in Field" -- There's ALWAYS more than one way to skin ... Check if first character in text box (memo field) is a new line ...I have a memo field that hold comments about a record. They however like each new comment that is added to be at the beginning (top) not the end. What I ... New Line in the default value of a text box in form - microsoft ...... Sarah, I'm not really convinced that poking lots of info into a memo is the ... Always use a multi-line text box if new-line characters are valid input. ... is a label or ... Enter new line in rich text memo field DataBaseAnother option would be to open the form in design view, select the text box, and on the Other tab of the Properties box, set the Enter Key Behavior to New Line in Field. 7/27/2012 11:08:35 AM
|