please help me to fix this code
this is working with mdb database and date() i wont working in sql
i try every thing is working great but the date() i wont change to DateFromServer() its not working
DateFromServer() module
please help me
this is working with mdb database and date() i wont working in sql
i try every thing is working great but the date() i wont change to DateFromServer() its not working
Code:
Private Sub Form_Load()
Dim intStore As Integer
intStore = DCount("[id_amlyat]", "[form_amlyat]", "[date end] <=[COLOR="Red"]Date()[/COLOR]+2 AND [check_box] =-1 ")
If intStore = 0 Then
Exit Sub
Else
If MsgBox("found " & intStore & "title " & _
"remaining 48 hours " & vbCrLf & vbCrLf & _
" " & _
" do you wont continue? " & _
" ", vbYesNo Or vbExclamation Or vbDefaultButton1, _
"alert") = vbYes Then
DoCmd.OpenForm "Qremeber_amlyat", acNormal
Else
Exit Sub
End If
End If
End Sub
Code:
Private Sub Form_Load()
Dim intStore As Integer
intStore = DCount("[id_amlyat]", "[form_amlyat]", "[date end] <=[COLOR="SeaGreen"]DateFromServer()[/COLOR]+2 AND [check_box] =-1 ")
If intStore = 0 Then
Exit Sub
Else
If MsgBox("found " & intStore & "title " & _
"remaining 48 hours " & vbCrLf & vbCrLf & _
" " & _
" do you wont continue? " & _
" ", vbYesNo Or vbExclamation Or vbDefaultButton1, _
"alert") = vbYes Then
DoCmd.OpenForm "Qremeber_amlyat", acNormal
Else
Exit Sub
End If
End If
End Sub
DateFromServer() module
Code:
Public Function DateFromServer() As String
DateFromServer = DLookup("MASARDATE", "MASARDATE")
End Function
please help me