ControlSource

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm pretty good with Excel and VBA for Excel, but my Access skills have
gotten rusty. I want to do one of two things:

1) Add a text box to a form that will display the full name entered into the
form by combining the first and last name. I've tried entering a formula
into the control source to do this =[Contacts]![Firstname] & " " &
[Contacts]![Lastname] but I am getting an error message #Name? As best I can
ascertain this might be due to a missing component.

2) Create an access field that automatically populates and updates with the
concatenation of the Firstname field and the Lastname field.

I'm not necessarily looking for the easiest way to do this. Learning
something new and improving my proficiency is always welcome.

Thanks in advance for your help.
 
Try this:

Forms![form name]![Contacts]![Firstname] & " " &
Forms![form name]![Contacts]![Lastname]

I'm pretty good with Excel and VBA for Excel, but my Access skills have
gotten rusty. I want to do one of two things:

1) Add a text box to a form that will display the full name entered into the
form by combining the first and last name. I've tried entering a formula
into the control source to do this =[Contacts]![Firstname] & " " &
[Contacts]![Lastname] but I am getting an error message #Name? As best I can
ascertain this might be due to a missing component.

2) Create an access field that automatically populates and updates with the
concatenation of the Firstname field and the Lastname field.

I'm not necessarily looking for the easiest way to do this. Learning
something new and improving my proficiency is always welcome.

Thanks in advance for your help.
 
Thanks for your reply. I tried entering "=[Forms]![Contacts
Form]!Contact!Firstname & " " & [Forms]![Contacts Form]!Contact!Lastname"
into the control source property of the text box while in design view, but I
still got the same error. Did I misunderstand your suggestion? I think it
may turn out to be that I am missing a specific component, Msowcf.dll,
according to the help file.

Try this:

Forms![form name]![Contacts]![Firstname] & " " &
Forms![form name]![Contacts]![Lastname]

I'm pretty good with Excel and VBA for Excel, but my Access skills have
gotten rusty. I want to do one of two things:

1) Add a text box to a form that will display the full name entered into the
form by combining the first and last name. I've tried entering a formula
into the control source to do this =[Contacts]![Firstname] & " " &
[Contacts]![Lastname] but I am getting an error message #Name? As best I can
ascertain this might be due to a missing component.

2) Create an access field that automatically populates and updates with the
concatenation of the Firstname field and the Lastname field.

I'm not necessarily looking for the easiest way to do this. Learning
something new and improving my proficiency is always welcome.

Thanks in advance for your help.
 
Back
Top