Sorry, I'm not as savvy as you. This is the code that links the form ... can
you tell me where it change it?
Option Compare Database
Sub Form_Current()
On Error GoTo Form_Current_Err
If ChildFormIsOpen() Then FilterChildForm
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub
Sub ToggleLink_Click()
On Error GoTo ToggleLink_Click_Err
If ChildFormIsOpen() Then
CloseChildForm
Else
OpenChildForm
FilterChildForm
End If
ToggleLink_Click_Exit:
Exit Sub
ToggleLink_Click_Err:
MsgBox Error$
Resume ToggleLink_Click_Exit
End Sub
Private Sub FilterChildForm()
If Me.NewRecord Then
Forms![Resume].DataEntry = True
Else
Forms![Resume].Filter = "[Candidate ID] = " & Me.[Candidate ID]
Forms![Resume].FilterOn = True
End If
End Sub
Private Sub OpenChildForm()
DoCmd.OpenForm "Resume"
If Not Me.[ToggleLink] Then Me![ToggleLink] = True
End Sub
Private Sub CloseChildForm()
DoCmd.Close acForm, "Resume"
If Me![ToggleLink] Then Me![ToggleLink] = False
End Sub
Private Function ChildFormIsOpen()
ChildFormIsOpen = (SysCmd(acSysCmdGetObjectState, acForm, "Resume") And
acObjStateOpen) <> False
End Function
Klatuu said:
Forms!resumes!SomeControl = Me.SomeControl
:
I apologize to those who tried to help me when I was calling it a "subform"
instead of a "linked form".
I have a form (candidates) and a linked form (resumes). I am trying to pass
the autonumber primary key (Candidate ID) on the first form to the same field
on the Resume form. How can this be done?