M
marie
Hi there,
I am trying to fix an error that came up when running the load command from
a form. But could not figure out what is wrong with it.
The debugger took me to the code below. The 1st line Private Sub Form_Load()
is highlighted in yellow.
---------------------------------------------------------------------
Private Sub Form_Load()
Dim current_date As Date
' Command3.Enabled = False
Set dbs = CurrentDb
Set rstLoad = dbs.OpenRecordset("tblLoad", dbOpenTable)
last_load_date = rstLoad![Date Last Load]
current_date = Format(Now(), "yyyy/mm/dd")
lblLastLoad.Caption = " Data last loaded on " & last_load_date
If last_load_date = current_date Then
cmbquit.SetFocus
' cmdLoad.Enabled = False
cmdLoad.Visible = False
lblload.Visible = False
End If
End Sub
------------------------------------------------------------------
Basically, the cmd is supposed to upload a couple of files into the
database. It used to work, but for some reason, we had issues in the past
couple of days.
Can you assist?
'Much appreciated.
I am trying to fix an error that came up when running the load command from
a form. But could not figure out what is wrong with it.
The debugger took me to the code below. The 1st line Private Sub Form_Load()
is highlighted in yellow.
---------------------------------------------------------------------
Private Sub Form_Load()
Dim current_date As Date
' Command3.Enabled = False
Set dbs = CurrentDb
Set rstLoad = dbs.OpenRecordset("tblLoad", dbOpenTable)
last_load_date = rstLoad![Date Last Load]
current_date = Format(Now(), "yyyy/mm/dd")
lblLastLoad.Caption = " Data last loaded on " & last_load_date
If last_load_date = current_date Then
cmbquit.SetFocus
' cmdLoad.Enabled = False
cmdLoad.Visible = False
lblload.Visible = False
End If
End Sub
------------------------------------------------------------------
Basically, the cmd is supposed to upload a couple of files into the
database. It used to work, but for some reason, we had issues in the past
couple of days.
Can you assist?
'Much appreciated.