Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining fields in Access.... again.

Status
Not open for further replies.

Hermanator

Technical User
Jan 16, 2002
30
NL
Hello,

I've asked this question before, and received answers, but still haven't solved my problem. This is what I want to do:

A form in which, after a certain text is entered, in an other field a value is placed which is a combination of other fields. For example, I enter a name in the field NAME and after that, in the field E-MAIL appears: name@hotmail.com (for example).
I know by now that you can make a field as a combination with:
=
![field]&"some text"

But where to enter this? Somewhere in the table or somewhere in the form ? I have tried to enter the text as a Default value in the form. I have also tried to use it in the form using a [Event Procedure].

You've already helped me a lot. I hope you can help me with this last point!

Thank you!
 
Well, Hermanator, I am not an Access guru, but I can find my way around VB.

1. You have to determine what event you want to trigger the placing of text in an object, like a button.

2. In that event, you reference that target and assign the text to the appropriate property...

So lets suppose that entering data in Text1 and Text3, and that Text2 is the object and that clicking Button1 is the event...
Code:
Private Sub CommandButton1_Click()
     UserForm1.TextBox2.Text = TextBox1.Text & TextBox3.Text
End Sub
Hope this helps. :) Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top