Can't seem to concatenate...

  • Thread starter Thread starter Crispy
  • Start date Start date
C

Crispy

Hi,

I appologize ahead of time for probably asking a very stupid/basic question.
But, I can not get this to work and have no idea why.

I have a student database with three tables... Student Records, Student
Parent Information and Student Emergency Contacts. All three tables are
linked by StudentID. The students basic information is contained in the
Student Records table (last name and first name, etc.).

I created a form for Student Records. I then created forms for Parent
Information and Emergency contacts--- and then linked these two forms to the
main student records form with command buttons. I wanted to have the
Students first name and last name appear concatenated on the two "subforms"
across the top.

Unfortunately I can not figure out how to do this. Could someone please tell
me how?

I created an unbound text box in both these forms and then have:

=([Student Records]![SFirstName] & [Student Records]![SLastName])

in the Control Source for the text box.

My understanding was that this code pulls the Student first name and last
name from the Student Records table and puts it in the text box on the form.

But I get this error when the form is not in design view:

#Name?

Any help? Thanks!!
 
What is the Record Source of these other 2 forms? Is the student's name part
of the Record Source?

One way to do this would be to use a query to feed the two forms. In the
query you would include that appropriate table for that form and the
[Students Records] table. You would then be able to access the students
name. You would get the correct name because the two tables will be linked
by the StudentID field (there should be a link line between the two tables
in the query linking them on the StudentID field).
 
Hi,

That did the trick. I didnt' have them connected in the record source/query.

Thank you again!


Wayne Morgan said:
What is the Record Source of these other 2 forms? Is the student's name part
of the Record Source?

One way to do this would be to use a query to feed the two forms. In the
query you would include that appropriate table for that form and the
[Students Records] table. You would then be able to access the students
name. You would get the correct name because the two tables will be linked
by the StudentID field (there should be a link line between the two tables
in the query linking them on the StudentID field).

--
Wayne Morgan
Microsoft Access MVP


Crispy said:
Hi,

I appologize ahead of time for probably asking a very stupid/basic question.
But, I can not get this to work and have no idea why.

I have a student database with three tables... Student Records, Student
Parent Information and Student Emergency Contacts. All three tables are
linked by StudentID. The students basic information is contained in the
Student Records table (last name and first name, etc.).

I created a form for Student Records. I then created forms for Parent
Information and Emergency contacts--- and then linked these two forms to the
main student records form with command buttons. I wanted to have the
Students first name and last name appear concatenated on the two "subforms"
across the top.

Unfortunately I can not figure out how to do this. Could someone please tell
me how?

I created an unbound text box in both these forms and then have:

=([Student Records]![SFirstName] & [Student Records]![SLastName])

in the Control Source for the text box.

My understanding was that this code pulls the Student first name and last
name from the Student Records table and puts it in the text box on the form.

But I get this error when the form is not in design view:

#Name?

Any help? Thanks!!
 
Back
Top