Without getting too deep, the Access Form Wizard is restricted to synchronizing a mainForm with subform(s) only!. The Type View (single/continuous) of this mainform/subform combination is further restricted. No means is provided to synchronize a form seperate/external to the mainform.
Maybe you want:
A continuous view mainform to synchronize a continuous view subform.
A continuous view subform to synchronize another continuous view subform.
A mainform or subform to synchronize any other form.
For one form to be dependent on another, it has to be synchronized. There are several methods to do this. The one I present here allows synchronization even after both forms are open (most other methods synchronize the dependent form only on open). Goto to a record on the MainForm and the DependentForm synchronizes (follows along).
Now the process (don't forget to backup the database in case you want to come back to square one).
Note: In any code, you! substitute all names in purple. Note: Here after the main form is referred to as the Master. The dependent form (controlled form) is referred to as the Slave.
If the Slave is a subform, Open its parent or main form, call up the form properties, click the Data Tab, then click the subForm control. Remove any text in the Link Master/Child properties. Set the Default View as desired. Save & Close the form.
Make a query for the Slave with the fields you desire. Be sure to include a field common to both Master & Slave (usually the PrimaryKey . . . in fact thats what I use in the example code). Stay in Query Design View.
In the criteria for PrimaryKey add the following:
CODE
Forms!MasterFormName!PrimaryKeyName
Save & name the query.
Open the Slave in design view and in the RecordSource property of the form, select the query from the dropdown list. Then set the Default View as desired!
Save/Close the form.
If your controlling a subform goto the next step, otherwise continue. The Master needs to detect if the Slave is open. If it is, synchronization is performed by a simple Requery of the Slave! So in a module in the modules window add the following code:
CODE
Function IsOpenFrm(frmName As String) As Boolean Dim cp As CurrentProject, Frms As Object
Set cp = CurrentProject() Set Frms = cp.AllForms
If Frms.Item(frmName).IsLoaded Then If Forms(frmName).CurrentView > 0 Then IsOpenFrm = True End If
Set Frms = Nothing Set cp = Nothing
End Function
Finally, in the On Current event of the Master add the following.
If your controlling an external form (non subform):
CODE
If IsOpenFrm("SlaveFormName") Then Forms!SlaveFormName.Requery End If
If your controlling a subform:
CODE
Me!SlaveFormName.Requery
For external slave forms (on subform), however you decide to open the Slave, don't do anything special, just open it (like DoCmd.OpenForm "SlaveFormName"). It'll automatically synchronize on open! Thats it. Give it a whirl and let me know . . . .