I have designed a Parent form called Daily Dispatch Log. However I rarely
enter vehicle information so I wanted to use a command button to open a
subform to enter vehicle information when I need to. The subform opens to
record 1 instead of the current record that the parent is working in. What
needs to be done.
Thanks Jen
Subforms are forms that are embedded in a parent form and
are open all the time. Parent and child will not be
synchronized unless the linked fields are specified in
the subform control.
However, it sounds like you want a pop-up form that
displays infrequently used/edited info.
- create the pop-up form and specify the property
for "pop-up" to Yes.
- set the modal property to "Yes" if you want your users
to deal with that form before going back to the parent.
- the command line in your parent form command button
should contain a "where condition" that contains the
linked info...
Dim strLinkCriteria as String
strLinkCriteria = "[intVehicleID] = " & Cstr(Me!
[intVehicleID])
db.OpenForm "frmVehicleInfoPop",,,strLinkCriteria
>-----Original Message-----
>I have designed a Parent form called Daily Dispatch Log. However I rarely
[quoted text clipped - 5 lines]
>Thanks Jen
>.
Jennifer P - 25 Mar 2005 15:05 GMT
This is what I have so far but I can't seem to get yours to run..I keep
getting a run time error when I add it to what I have:
Private Sub Vehicle_Information__Form_Click()
On Error GoTo Err_Vehicle_Information__Form_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Vehicle"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Vehicle_Information__Form_Click:
Exit Sub
Err_Vehicle_Information__Form_Click:
MsgBox Err.Description
Resume Exit_Vehicle_Information__Form_Click
End Sub
> Subforms are forms that are embedded in a parent form and
> are open all the time. Parent and child will not be
[quoted text clipped - 29 lines]
> >Thanks Jen
> >.