Change form record to match another form

  • Thread starter Thread starter Dave - Freedonia
  • Start date Start date
D

Dave - Freedonia

I had a form with a lot of controls/subforms and this was causing my
database to move slow. I decided to split the controls on two forms.
Each form has two ways to navigate through the records:
1) The record selectors at the bottom of the form
2) A combo box with all of the records listed

What I would like to do now is to add a button to form1 that will open
form2 to the record with the same number as form1 and vice versa. The
main field controlling each form is called StudyNum.

I can't figure it out. I could get the subforms on form2 to match the
record position on form1 but I can't seem to get form2 to update
anything that isn't in a subform. Since the forms are identical in
coding, the same problem exists when I go from form2 to form1, the
subforms update but any controls on the 'main' part of the form won't.

Currently, a user will select a record on form1, make changes, hit a
button to open form2 then have to navigate to the same record number
otherwise form2 will open to the first record in the table.

Can anyone shed any light on how to get this to work?

Thanks,
Dave
 
OK. After more research, I found the answer.

I changed the coding on form1 to change the value of the combo box on
form2 and then call the AfterUpdate event of the combo box on form2. Of
course, I had to change the AfterUpdate event from Private to Public.

Dave
 
Back
Top