Hello,
Im trying to figure out if you can create many if statments with in each other? So far i can only get 2 to work. I need about 8 to run one after the other if the initial criteria is not meet.
So for example if Text1 is "" then run code else run another code else run another one and so on. But for some reason it will only let me run two.
Any help would be great.
Here is what i have so far
What i need to do is get this code to keep going some how where i can add in a check for box 4, 5 and etc.
Thank for the help in advance.
Im trying to figure out if you can create many if statments with in each other? So far i can only get 2 to work. I need about 8 to run one after the other if the initial criteria is not meet.
So for example if Text1 is "" then run code else run another code else run another one and so on. But for some reason it will only let me run two.
Any help would be great.
Here is what i have so far
Code:
If Me.Text12 = "" Then
Me.Text12 = DLookup("[Box1]", "MainTable", _
"[Date]=#" & Format(Text1, "mm/dd/yy") & "# " & _
"And [Box1]=" & Chr(34) & Text3 & Chr(34))
Me.Text17 = DLookup("[Date]", "MainTable", _
"[Date]=#" & Format(Text1, "mm/dd/yy") & "# " & _
"And [Box1]=" & Chr(34) & Text3 & Chr(34))
Me.Text10 = DLookup("[BoxNumber]", "MainTable", _
"[Date]=#" & Format(Text1, "mm/dd/yy") & "# " & _
"And [Box1]=" & Chr(34) & Text3 & Chr(34))
Else
Me.Text12 = DLookup("[Box2]", "MainTable", _
"[Date]=#" & Format(Text1, "mm/dd/yy") & "# " & _
"And [Box2]=" & Chr(34) & Text3 & Chr(34))
Me.Text17 = DLookup("[Date]", "MainTable", _
"[Date]=#" & Format(Text1, "mm/dd/yy") & "# " & _
"And [Box2]=" & Chr(34) & Text3 & Chr(34))
Me.Text10 = DLookup("[BoxNumber]", "MainTable", _
"[Date]=#" & Format(Text1, "mm/dd/yy") & "# " & _
"And [Box2]=" & Chr(34) & Text3 & Chr(34))
End If
Thank for the help in advance.
Comment