Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Forms _ Use Three Fields To Populate A Fouth Field

Posted by: joeyc0323 Mar 20 2017, 01:53 PM

I have three fields in my Access 2010 form which I would like to use to auto-populate a fourth field. The fields I have are Student_First_Name, Student_Middle_Name, and Student_Last_Name. On update to the last name field I would like it to concatenate the three fields into one field name full_student_name. Due to the nature of the form, all fields must be saved in the table. I have fields for all four in the table. I would like this to be in VBA and not in a macro.

Thanks!

Posted by: theDBguy Mar 20 2017, 02:13 PM

Hi,

You should be able to simply use a Calculated field rather than VBA or macro.

Just my 2 cents...

Posted by: doctor9 Mar 20 2017, 02:19 PM

joeyc0323,

> Due to the nature of the form, all fields must be saved in the table.

This doesn't make sense - can you elaborate on this? Why can't you use an unbound textbox on the form to display the full name?

Remember; a field is something you find in a table that stores data. A control is something you find on a form that displays data. These are different objects.

Dennis

Posted by: joeyc0323 Mar 20 2017, 02:25 PM

Thanks, I forgot all about using a calculated field. Just made the change and works perfect!

Posted by: theDBguy Mar 20 2017, 03:04 PM

Glad we could assist. Good luck with your project.