Hi
I am trying this:
When user opens a db he goes through a splash form
the form checks whether the data has been downloaded on the table Orders and if the user is logged into the db on the table Users
on the table Orders is looking at the date where it should be only today`s date (date() ).
I want to make it so that:
If the date in the Orders table is today, and there is a user (or more) logged then go directly to the main form called MAIN, otherwise
go to form Input.
I tried this code but is not working proberly:
Code:
Private Sub Form_Timer()
Dim rstdownloader As DAO.Recordset
Dim rstdone As DAO.Recordset
Set rstdownloader = CurrentDb.OpenRecordset("SELECT First(User.LogOnDate) AS LOGIN FROM User")
Set rstdone = CurrentDb.OpenRecordset("SELECT last(Orders.DATE) AS done FROM Orders")
If rstdownloader.RecordCount > 0 And rstdone Is Date Then
DoCmd.OpenForm "Main"
Else
'DoCmd.OpenForm "input"
'On the forms timer event close the start-up form
'Open up the main switchboard form when the start-up form closes
'End If
DoCmd.Close acForm, "Splash"
End Sub
another version I tried:
Code:
If IsNull(Me.USER_GLOBAL) Or Me.EBAN_CHECK = "Date()" Then
MsgBox "DOWNLOAD HAS BEEN DONE", vbOKOnly, "IMFORMATION"
DoCmd.OpenForm "M_FORM"
Exit Sub
End If
but none is working
any ideas?
Thanks a lot
Webisti