I have been looking up on the web on how to do this but dont seem to be able to find it.
Now I would like to use Expr2 in a If Then statement to pop up a msg box but I dont know the right way to reference to it (newb)
That surely doesnt work. Thanks in advance.
Code:
Private Sub Form_Open(Cancel As Integer)
Dim SQL As String
SQL = "SELECT TOP 1 OPS_REG_ALGEMEEN.TypeInzet, OPS_REG_ALGEMEEN.Datum, Now()-[Datum] AS Expr2 " & _
"FROM OPS_REG_ALGEMEEN WHERE (((OPS_REG_ALGEMEEN.TypeInzet) = 3)) ORDER BY OPS_REG_ALGEMEEN.Datum DESC;"
End Sub
Now I would like to use Expr2 in a If Then statement to pop up a msg box but I dont know the right way to reference to it (newb)
Code:
If SQL.Expr2 > 25 Then
MsgBox ("Hello")
End If
That surely doesnt work. Thanks in advance.