Variable not Found

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top