Afternoon all,
Let me explain what I am attempting to do here:
I have a database with a list of contacts, and with these list of contacts, I have also created an agenda. Inside this agenda table, I have a field called "Contact ID". "Contact ID" has a one-to-many relationship set up with the primary key in the contacts table, "ID". (refer to pic1.jpg) I intend for the database to automatically update the "Contact ID" based on what contact is currently selected.
For example, If I open a contact with ID #3 (refer to pic2.jpg), and then I open the Agenda form, the "Contact ID" will automatically update to the contact "ID". From here, I can add events and such that will automatically relate to that particular client.
My problem is I don't know how I should do this, whether I need to set a default value for "Contact ID", use a query, or use some sort of VB coding to get it done. I've already tried to use things like:
Code:
Private Form_Load()
[AGENDA].[Contact ID] = [CONTACTS].[ID]
and that didn't work. I assume I might need something like a TempVar or ActiveForm/ActiveDatasheet code to call for ID to be automatically updated?
Thanks for your help everyone, looking forward to your responses!