View Full Version : Newbie - Custom Forms
PhilBert
07-03-2007, 02:01 PM
:banghead: I've created a custom form and one of the text fields on the form has data that I want to place automaticlly in the subject line of the form either as focus leave the text field or prior to sending the form. I have no idea where or how to start. I don't mind reading so if there are pages with this type of information on them that would be great.
Thanks
Ebrow
07-04-2007, 03:45 PM
Not sure what you mean by "Subject Line" do you mean the Caption of the form.
If so I would use this code in the BeforeUpdate event of the control (i.e textbox) you are updating.
e.g
<VBA>
Private Sub Text0_BeforeUpdate(Cancel As Integer)
Me.Caption = Text0.Text
End Sub
</VBA>
This would be for a textbox called Text0. Whatever you typ in Text0 will change the caption on the form.
If this is not what you are looking for, please clarify.
Ebrow
07-04-2007, 03:46 PM
Sorry code should be:-
Private Sub Text0_BeforeUpdate(Cancel As Integer)
Me.Caption = Text0.Text
End Sub
PhilBert
07-05-2007, 06:26 AM
The from I created was taken from a mesage form. On my new form I've left the following fields that would be found on a normal e-mail:
To:, Cc: and Subject. It's the subject line I want to modify with the text that is in a text box. Thank you for your help.
Trevor
12-10-2007, 04:56 PM
The from I created was taken from a mesage form. On my new form I've left the following fields that would be found on a normal e-mail:
To:, Cc: and Subject. It's the subject line I want to modify with the text that is in a text box. Thank you for your help.
How are you sending your email? using the send object command? using the outlook model?
If you are using the send object then
Dim strsubject as string
Dim strsubject = Me. textbox
Me.textbox = strsubject
If your using the outlook modle
then
.subject = Me.textbox
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.