2013-02-23

Hi everyone,

My first post. I have created a main customer form in Access 2003. This contains the usual contact details, name, address etc.

In order to keep the form clutter free I have created another form for optional information. This opens when you press the appropriate button which has already been coded with DoCmd.openform. Only pre-entered data related to the particular client id is shown.

My problem is that when I want to add new data to the optional form, I can update all the fields except the foreign key which remains at its default of 0.

I don't know what code I need to ensure that when the form is updated the correct ID matches the current client.

I have been searching for an answer for ages so I would appreciate some idea of how I get the foreign key to work for me.

Thanks in advance.

Show more