Very Simple Question...

Noreene Patrick

Registered User.
Local time
Today, 17:54
Joined
Jul 18, 2002
Messages
223
I have a field on my form that is bound to a table. It allows me to type in spouse first name. That works great.

But, when I exit the field, I want code to take the spouse first name I entered and add the last name which has already been entered previously on the form...(It just keeps from having to type in last name again.)

My code on the field txtspousename on exit event is this:
me.txtspousename = me.txtspousename.value + me.txtlastname.value

It works!! But, I cannot figure out how to get the space in between spousename and lastname..It looks like this: NoreenePatrick. I want it to look like Noreene Patrick.

I tried using the & " " & between the fields but somehow it doesnt quite work...Can you help?

Thanks in advance.
 
me.txtspousename = me.txtspousename.text & " " & me.txtlastname.text

Should work depending on the version of Access (used to use + instead of & I think prior to A95).
 
It worked!!! Thanks so Much!!
 

Users who are viewing this thread

Back
Top Bottom