I am running code4
Ok, when I am running it as a Module - table gets populated.
When I run it on Form cmd Click event I am still getting that error.
Public Function cmd_Run_Click()
Dim sSQL As String
Dim dbR As DAO.Database
Set dbR = CurrentDb()
DoCmd.SetWarnings True
sSQL = "Insert into Data_table SELECT [tbl_500 - Data].[Pay Date] FROM [tbl_500 - Data];"
dbR.Execute sSQL
lst_Cutoff_Dates.RowSource = sSQL
End Function
that gives me an error
The expression on click you entered ... produces ... error
The expression may not result in the name of macro
There may have been an error evaluating the function...
__________________________________________________________
However as a Module it runs as a dream and populated table.
-------------------------------------------------------------
Do you see anything wrong with my code? Thanks
Ok, when I am running it as a Module - table gets populated.
When I run it on Form cmd Click event I am still getting that error.
Public Function cmd_Run_Click()
Dim sSQL As String
Dim dbR As DAO.Database
Set dbR = CurrentDb()
DoCmd.SetWarnings True
sSQL = "Insert into Data_table SELECT [tbl_500 - Data].[Pay Date] FROM [tbl_500 - Data];"
dbR.Execute sSQL
lst_Cutoff_Dates.RowSource = sSQL
End Function
that gives me an error
The expression on click you entered ... produces ... error
The expression may not result in the name of macro
There may have been an error evaluating the function...
__________________________________________________________
However as a Module it runs as a dream and populated table.
-------------------------------------------------------------
Do you see anything wrong with my code? Thanks