I tried opening each Form separately, to see where I get the popup. It's only on two: the Form in question (which I'll call Subform here), and the Form that uses the Subform. Here is all the VBA code used inside each form.
SUBFORM:
Code:
Option Compare Database
Option Explicit
Private Sub OpenButton_Click()
Dim recordID As Integer
recordID = Me.TimecardID
DoCmd.OpenForm "Timecards", , , "TimecardID = " & recordID
End Sub
FORM:
Code:
Option Compare Database
Option Explicit
Private Sub Command65_Click()
If Me.Dirty Then Me.Dirty = False
End Sub
Private Sub Command66_Click()
If Me.Dirty Then Me.Dirty = False
If MsgBox(Prompt:="Are you sure you wish to delete this record?", Buttons:=vbYesNo, Title:="Confirm Deletion") = vbYes Then
On Error Resume Next
DoCmd.RunCommand acCmdDeleteRecord
If Err.Number = 0 Then
MsgBox Prompt:="Record Deleted.", Buttons:=vbOKOnly, Title:="Deletion Successful"
Else
MsgBox Prompt:="No deletion occurred.", Buttons:=vbOKOnly, Title:="Error"
End If
Else
MsgBox Prompt:="The record was not deleted.", Buttons:=vbOKOnly, Title:="Canceled"
End If
End Sub
Private Sub NewTimeCardButton_Click()
DoCmd.OpenForm FormName:="Timecards", View:=acNormal, DataMode:=acFormAdd, WindowMode:=acWindowNormal, OpenArgs:=Me.EmployeesOnJobsID
End Sub
I don't see anything in either of them that could be causing this problem. You?