View Single Post
  #8  
Old March 10th, 2008, 07:59 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default SUBFORM - AUTO POPULATE PRIMARY KEY

On the MainForm that is bound to school, place and UNBOUND Txtbox
named txtThisCourseID - make visible property False.

In the Oncurrent event of the Course subform have it move the Course
ID to the field you just created.
Forms![MainForm]![txtThisCourseID] = me.CourseIDname.

In the FORM Property window in the Form Tab use the wizard to
establish the master/Child relationship between this subform and the
"MainFomr" txtThisCourseID.

This will automatically filter all sites for this course for this
school, and will automatically load the courseID into the site record
you create there.

Ron