J
Jean-Paul
I have a form with a number (=the number of the current week)
Next to this number I have 2 pushbuttons: + and - to increase and
decrease the number (getting next or previous week.
On this form I created a subform. I get data from a table matching the
weeknumber.
When I click (as an example) the - pushbutton, I wrote
Me!weeknummer = Me!weeknummer - 1
If Me!weeknummer = 0 Then
Me!weeknummer = 52
End If
Dim sql As String
sql = "SELECT [Adressen metaal].*, [Adressen metaal].Naam,
[Adressen metaal].Datum_bezoek, [Adressen metaal].bezoeken,
DatePart('ww';[Datum_bezoek]) AS Expr1 FROM [Adressen metaal] WHERE
[Adressen metaal].Bezoeken = True And DatePart('ww'; [Datum_bezoek]) = "
& Me!weeknummer & " ORDER BY [Adressen metaal].Naam;"
Forms![bezochten].Form!Week_sub_bezoek.RecordSource = sql
I get an error on the last line saying
the object doesn't support this...
How to solve this problem?
Thanks
JP
Next to this number I have 2 pushbuttons: + and - to increase and
decrease the number (getting next or previous week.
On this form I created a subform. I get data from a table matching the
weeknumber.
When I click (as an example) the - pushbutton, I wrote
Me!weeknummer = Me!weeknummer - 1
If Me!weeknummer = 0 Then
Me!weeknummer = 52
End If
Dim sql As String
sql = "SELECT [Adressen metaal].*, [Adressen metaal].Naam,
[Adressen metaal].Datum_bezoek, [Adressen metaal].bezoeken,
DatePart('ww';[Datum_bezoek]) AS Expr1 FROM [Adressen metaal] WHERE
[Adressen metaal].Bezoeken = True And DatePart('ww'; [Datum_bezoek]) = "
& Me!weeknummer & " ORDER BY [Adressen metaal].Naam;"
Forms![bezochten].Form!Week_sub_bezoek.RecordSource = sql
I get an error on the last line saying
the object doesn't support this...
How to solve this problem?
Thanks
JP