Hello,
I'm trying to pre-populate a foreign key field [client_ID] when creating a record; whether creating a new record in the table itself or a form.
table 1 = Clients
table 2 = Invoices
table Clients has the [Client_ID] field and all client data. The Invoice table contains many invoice records for the respective client record.
I've created a one to many relationship between the two tables, based on [client_ID]. So there is a foreign key field called [client_ID] in the Invoice table.
My problem is, when creating a new record in the Invoice table or a form using the Invoice table data, I cannot seem to find a way to pre-populate the foreign key field.
How would I do this? I have tried adding another field from the Client table, to the Invoice table called [Client_Nickname]. I can select a value in the dropdown field under the Invoice table, for [Client_Nickname] but it does not prepopulate the field in the Invoice table with the [Client_ID] value.
My goal is to have a Invoice form where I can create a new Invoice record, select the Client's name from a dropdown (or nickname) and have that client's ID field on the same form, pre-populate. As it is now, I have to select the [Client_Nickname] from a dropdown field then also select a value for the [Client_ID] dropdown field. Then save the record.
I'd rather just select client nickname and the client ID prepopulate if that makes any sense...
thank you.