Valery
Registered User.
- Local time
- Today, 15:45
- Joined
- Jun 22, 2013
- Messages
- 363
Hi everyone!
I have a form: frmUnitUpd with a subform: frmUnitUpd_Parking based on tblParking.
In the subform, I have a command button to open a popup form called : frmUnitUpd_ParkingFees, based on tblParkingFees.
The Parking and the Parking Fees table are linked by : PkgID which is the primary key of the Parking table.
I have always used the following code but never for a "sub-sub form". Is there something I need to add?
The popup does open, saves the data but NOT leaves the PkgID blank, so no link to it's main form.
Really would appreciate some detailed help. THANK YOU.
I have a form: frmUnitUpd with a subform: frmUnitUpd_Parking based on tblParking.
In the subform, I have a command button to open a popup form called : frmUnitUpd_ParkingFees, based on tblParkingFees.
The Parking and the Parking Fees table are linked by : PkgID which is the primary key of the Parking table.
I have always used the following code but never for a "sub-sub form". Is there something I need to add?
The popup does open, saves the data but NOT leaves the PkgID blank, so no link to it's main form.
Code:
Private Sub cmdPkgFees_Click()
On Error GoTo Err_cmdPkgFees_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmUnitUpd_ParkingFees"
stLinkCriteria = "[PkgID]=" & Me![PkgID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdPkgFees_Click:
Exit Sub
Err_cmdPkgFees_Click:
MsgBox Err.Description
Resume Exit_cmdPkgFees_Click
End Sub
Really would appreciate some detailed help. THANK YOU.