Concatenate on Current Live Form

crhodus

Registered User.
Local time
Today, 00:11
Joined
Mar 16, 2001
Messages
257
I have 3 forms open at the same time (Company, Project, Contact). On the Contact form, I have FIRST_NAME, LAST_NAME, and CONTACT_ID. CONTAC_ID is the Primary Key.
I have the default value for CONTACT_ID set to
=[Forms]![1_Company_Form]![COMPANY_NUMBER] & "|" & [Forms]![6_Project_Form]![PROJECT_NUMBER] so that when the Contact form is opened, the CONTACT_ID automatically contains the vaule from the Company form and the Project form combined (Example CONTACT_ID Value: 123|abc ).

Is there a way that I can also have the FIRST_NAME and LAST_NAME value that is entered into the Contact form automatically concatenated to the CONTACT_ID whenever they are entered into the form? (New CONTACT_ID Value: 123|abc|John|Doe )
 
You would probably want to be sure that this operation is only done once (rather than repeated each time the user changes the first name or last name field value), and that it is only done when those fields are finalized. So, I would try putting this code in the form's BeforeUpdate event:

CONTACT_ID = CONTACT_ID & "|" & FIRST_NAME & "|" & LAST_NAME
 

Users who are viewing this thread

Back
Top Bottom