Greetings,
im struggling with this logic since three days now. I really need your help guys, something is wrong with me.
My problem is that im trying to change a picture from table.gif to tablex.gif, if meet some criteria. please find what i did till now
thank you in advance
im struggling with this logic since three days now. I really need your help guys, something is wrong with me.
My problem is that im trying to change a picture from table.gif to tablex.gif, if meet some criteria. please find what i did till now
Code:
Private Sub Form_Load()
Dim nCount1 As Integer
Dim nCount2 As Integer
nCount1 = DCount("Qty", "[openTables]", "[Table] = 1")
nCount2 = DCount("Qty", "[openTables]", "[Waiter] = '" & Me.userlookup.Caption & "'")
[COLOR=red]'this code below works, but doesent take in count '& Me.userlookup.Caption &'[/COLOR]
[COLOR=red]'If DCount("Qty", "[openTables]", "[Table] = 1") = 0 And DCount("Qty", "[openTables]", "[Waiter] = '" & Me.userlookup.Caption & "'") = 0 Then[/COLOR]
[COLOR=black]If nCount1 > 0 And nCount2 > 0 Then[/COLOR]
Me.tvl1.Picture = "tablex.gif"
Else
Me.tvl1.Picture = "table.gif"
End If
End Sub
thank you in advance