sync a form and two subforms

rober1967

New member
Local time
Today, 08:24
Joined
Jun 5, 2010
Messages
5
Hi, I'm new to access 2007 and I've been breaking my head over this problem for 2 days now and haven't managed to find a solution!

I've a form named "Temi" that include other two subforms "Eventi" and "Esiti".
Temi is related to Eventi with a field named "codice_tema", and Eventi is related to Esiti with a field named "codice_evento".
Now in my form I can link Temi and Eventi but I can't link Esiti with Eventi, the only way to link it is to include the subform Esiti nested in the subform Eventi but I don't like this solution graphically. Is there a way via VBA code to link Eventi and Esiti ? I attach my db, please don't comment...I'm newbie...

:D
 

Attachments

In your database [temi] is your main form.. [eventini] and [estini] are both subforms that should be linked to temi. Problem is, if you want to link both subforms together.. maybe it's better to have [eventini] as your main form and have both [temi] and [estini] as your subforms?
 
Solved, I used a query conditioned to the value of the first related subform field and to guarantee referential integrity I replaced the value of the related code of the second subform with the value of the first subform code on beforeupdate, a requery oncurrent and it seems work...
I attached the db if someone have curiosity to see...
 

Attachments

Users who are viewing this thread

Back
Top Bottom