D
DS
Is there another way to do this? it seems like a lot of Code!
Thanks
DS
Dim LSun As Date
LSun = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 1"), 0)
If LSun > 0 Then
Me.CheckSun = -1
ElseIf Me.CheckSun = 0 Then
End If
Dim LMon As Date
LMon = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 2"), 0)
If LMon > 0 Then
Me.CheckMon = -1
ElseIf Me.CheckMon = 0 Then
End If
Dim LTue As Date
LTue = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 3"), 0)
If LTue > 0 Then
Me.CheckTue = -1
ElseIf Me.CheckTue = 0 Then
End If
Dim LWed As Date
LWed = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 4"), 0)
If LWed > 0 Then
Me.CheckWed = -1
ElseIf Me.CheckWed = 0 Then
End If
Dim LThr As Date
LThr = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 5"), 0)
If LThr > 0 Then
Me.CheckThr = -1
ElseIf Me.CheckThr = 0 Then
End If
Dim LFri As Date
LFri = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 6"), 0)
If LFri > 0 Then
Me.CheckFri = -1
ElseIf Me.CheckFri = 0 Then
End If
Dim LSat As Date
LSat = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 7"), 0)
If LSat > 0 Then
Me.CheckSat = -1
ElseIf Me.CheckSat = 0 Then
End If
Thanks
DS
Dim LSun As Date
LSun = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 1"), 0)
If LSun > 0 Then
Me.CheckSun = -1
ElseIf Me.CheckSun = 0 Then
End If
Dim LMon As Date
LMon = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 2"), 0)
If LMon > 0 Then
Me.CheckMon = -1
ElseIf Me.CheckMon = 0 Then
End If
Dim LTue As Date
LTue = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 3"), 0)
If LTue > 0 Then
Me.CheckTue = -1
ElseIf Me.CheckTue = 0 Then
End If
Dim LWed As Date
LWed = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 4"), 0)
If LWed > 0 Then
Me.CheckWed = -1
ElseIf Me.CheckWed = 0 Then
End If
Dim LThr As Date
LThr = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 5"), 0)
If LThr > 0 Then
Me.CheckThr = -1
ElseIf Me.CheckThr = 0 Then
End If
Dim LFri As Date
LFri = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 6"), 0)
If LFri > 0 Then
Me.CheckFri = -1
ElseIf Me.CheckFri = 0 Then
End If
Dim LSat As Date
LSat = Nz(DLookup("StartDay", "MenuDetails", "MenuID = " &
Me.TxtMenuID & "And StartDay = 7"), 0)
If LSat > 0 Then
Me.CheckSat = -1
ElseIf Me.CheckSat = 0 Then
End If