Sylvia Fergusson
09-02-2001, 11:57 AM
I am trying to alter an existing database to suit my requirements. The existing db had a primary form with a link to two sub forms. I have taken the primary form and now have it as a subform of a subform within a form. Problem is I can not get it to open. I get a parameter box asking for a value when given it then states "open the maintenance form using the button on the assets form" this I am trying to do to no avail. Any help greatly appreciated. The following is the code that is used.
Private Sub Maintenance_Click()
On Error GoTo Err_Maintenance_Click
If IsNull(Me![AssetID]) Then
MsgBox "Enter asset information before opening maintenance form."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm "Maintenance"
End If
Exit_Maintenance_Click:
Exit Sub
Err_Maintenance_Click:
MsgBox Err.Description
Resume Exit_Maintenance_Click
End Sub
Private Sub Maintenance_Click()
On Error GoTo Err_Maintenance_Click
If IsNull(Me![AssetID]) Then
MsgBox "Enter asset information before opening maintenance form."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm "Maintenance"
End If
Exit_Maintenance_Click:
Exit Sub
Err_Maintenance_Click:
MsgBox Err.Description
Resume Exit_Maintenance_Click
End Sub