S
Senad
Hi All,
I have the following statement behind the button in forms:
strSQL = "SELECT * FROM Stories WHERE (((Stories.Date) >=
[Forms]![Form1].[From] And (Stories.Date) <= [Forms]![Form1].[To]))ORDER BY
Stories.Date, Stories.Country;"
Now, I have to add one more condition to the SQL based on the user input
(check box) and I thought I can do it the following way:
If Me.BriefingStories = truth Then
strSQL = strSQL + "AND [stories].[briegin story]=truth"
End If
qdf.SQL = strSQL
DoCmd.OpenForm "AdvanceSearch"
DoCmd.Close acForm, "Form1", acSaveNo
Nice idea, but it does not work.
I would appreciate if someone could help.
Thanks
Senad
I have the following statement behind the button in forms:
strSQL = "SELECT * FROM Stories WHERE (((Stories.Date) >=
[Forms]![Form1].[From] And (Stories.Date) <= [Forms]![Form1].[To]))ORDER BY
Stories.Date, Stories.Country;"
Now, I have to add one more condition to the SQL based on the user input
(check box) and I thought I can do it the following way:
If Me.BriefingStories = truth Then
strSQL = strSQL + "AND [stories].[briegin story]=truth"
End If
qdf.SQL = strSQL
DoCmd.OpenForm "AdvanceSearch"
DoCmd.Close acForm, "Form1", acSaveNo
Nice idea, but it does not work.
I would appreciate if someone could help.
Thanks
Senad