Adding value of 2 text boxes

  • Thread starter Thread starter Antonio
  • Start date Start date
A

Antonio

Hello, everyone...I would like to take the value from 2
textboxes (fname and lname) and put it into 1 text box
(name). Can I use the ControlSource? If so, how do I do
that? Thanks
 
Antonio said:
Hello, everyone...I would like to take the value from 2
textboxes (fname and lname) and put it into 1 text box
(name). Can I use the ControlSource? If so, how do I do
that? Thanks

=[fname] & " " & [lname]

And don't call the new control "Name". Most objects in Access and VBA have a
property called "Name" and having a field or control with this name can cause
problems. Use FullName or similar.
 
Hi,
Just put this in the current event of your form:

fullname= fName & " " & lname

Change the name of your textbox to fullname instead of name.
Name is a property of most objects and can cause problems.
 
Back
Top