Hello,
Here I would like to use data from a query parameter as a date that the person entered on a form. I am dealing with the recordset and parameters.
Here's the code:
Code:
Private Sub BT_GEN_CONSTAT_Click()
Sun qdf As DAO.QueryDef
Sun rcs As DAO.Recordset
Sun strLigneText As String
Sun strConstante As String
Sun schm As String
Sun infr As Integer
Sun db As DAO.Database
infr = FreeFile()
schm = "C: \ test.txt"
Open schm For Output As # infr
Set db = CurrentDb()
Set qdf = db.QueryDefs("para_const")
qdf.Parameters("Forms! F_GEN_CONSTAT! DATE_CONSTAT") = Forms! F_GEN_CONSTAT![DATE_CONSTAT]
Set rcs = qdf.OpenRecordset
...
When I try to run the following code , i get an error, do you have any idea about the error and please let me know why my code is giving an error.
Bookmarks