Private Sub Form_Open(Cancel As Integer)
Dim sSQL As String
sSQL = "SELECT tblMenuDayClean.MenuDayCleanID FROM tblMenuDayClean WHERE (((tblMenuDayClean.MenuDayNo_Clean)=[Forms]![frmMenu_MAIN]![txtDaySelect]) AND ((tblMenuDayClean.MenuCycleNo_Clean)=[Forms]![frmMAIN_STARTUP]![cboCycleNo]) AND ((tblMenuDayClean.MenuSeasonNo_Clean)=[Forms]![frmMAIN_STARTUP]![cboSeason]) AND ((tblMenuDayClean.MenuOrganizationNo_Clean)=[Forms]![frmMAIN_STARTUP]![cboOrganization]));"
If IsNull([MenuDayCleanID]) = True Then
Me.frmMenu_DayClean_Sub.Form.DataEntry = True
MsgBox "no data"
Else
Me.frmMenu_DayClean_Sub.Form.DataEntry = False
MsgBox "data"
End If
End Sub
|