I'm writing some very simple codes that i'm quite sure are correct (at least i can't find out what is wrong with it =P)
I'm trying to run the following:
-------------------------------------------------------------------------------------------------------------
Private Sub CSV_Click()
Call CSV(Forms![ValMainScreen].[vdate].Value)
End Sub
-------------------------------------------------------------------------------------------------------------
Sub CSV(valdate As Date)
Dim rst_p, rst_r, rst_table, rst_master As DAO.Recordset
Set db = CurrentDb
Set rst_p = db.OpenRecordset("Pol", dbOpenTable)
Set rst_r = db.OpenRecordset("Rid", dbOpenTable)
rst_p.Index = "PrimaryKey"
rst_r.Index = "PrimaryKey"
rst_r.MoveFirst
rst_p.MoveFirst.......etc.
-------------------------------------------------------------------------------------------------------------
When I tried to run "Call CSV", a msgbox pops up and says "Invalid use of Property".
I have used this format to call functions and subs I don't know why it's not working this time...
Can someone tell me what has gone wrong?
Thank you!!