Linked fields in tables

Grainne

New member
Local time
Today, 15:12
Joined
May 8, 2003
Messages
6
Have searched the forum for ages looking for an answer to this but have no idea where I'm going wrong.

I have about 4 tables that are linked through a contactID.

If I add data via the tables everything work ok e.g. I enter a unique contact ID and fill in all their details, I go to a second table and select the corresponding lookup id from a combo box and fill out further fields relating to that contact.

My problem is inputting data in forms, I've created one form with 2 sub forms. If I enter contact Id and details into the form and click on a subform, the contact ID doesn't exist unless I come out of the form and go back into it - not very user friendly!

Have I structued my tables incorrectly or is there a way I can put some code into 'on enter' or 'afterupdate' to put my contact id into all the tables simultaneously?

I don't want to re-input the ID, I just want to select it so the details on the form can be assigned to that specific ID

Can someone point me in the right direction, I seem to be going round in circles at the moment

Thanks
Grainne
 
Do you have the ID field in the mainform linked to the corresponding field in the subforms?

Fuga.
 
Ahhh thanks for replying

Yes

In my subform I have a combo box which lists all the ID's but the one I enter on my mainform doesn't appear in the subform list until I close the mainform

Grainne
 
Hi Fuga

Sorry, think I may have figured it out. Have been a bit stupid (obv. spent too much time on this today!) because it wasn't a subform I had at all it was a command button that opened another form!! derrrrr

Have recreated an actual subform and it seems to be pulling the ID number through.

Thanks for your help
Grainne
 

Users who are viewing this thread

Back
Top Bottom