combine two fields

ianatkins

Registered User.
Local time
Today, 21:14
Joined
Oct 25, 2002
Messages
16
Hi,
I Have two fields, title and surname, and would like to combine them to make a letter address field which takes the below format:

Dear [title] [surname]

This would be simple except some of my records already have this data entered in a letter address field. So I want this code to run on the click of a button (or when the letter address field is empty), and populate the field in the open form..

Any ideas?

Thanks
Ian.
 
You can join (or concatenate) the two fields by creating a textbox and setting its controlsource:
=[title]&" "&[surname]

this will give you the two fields w/ a space between them...
 
how can i change the "control source" on the click of a button?
 
create a command button....go to properties...on click event

dim x as string

x =[title]&" "&[surname]


letter address field = x


i hope this is what u mean.
:cool:
 

Users who are viewing this thread

Back
Top Bottom