JaedenRuiner
Registered User.
- Local time
- Today, 07:54
- Joined
- Jun 22, 2005
- Messages
- 154
in a SQL command you can do:
PARAMETERS [Data] Long;
Select [Data],Table.ID, Table.Name, Table.Something, table.SomeDate
from Table
where Year(Table.SomeDate) = [Data];
And then when you execute the saved query a dialog will pop-up asking for the value of [Data]. Is there a way to execute that query (especially if it is an action query) via VB where the parameter is provided by the code.
Example:
PARAMETERS [CurYear] LONG;
INSERT INTO tbl_Info (Year, ID1, ID2, Counts)
SELECT [CurYear], Tbl.ID1, Tbl.ID2, Tbl.Counts
From TBL;
so that on the action of the query I can combine the Select source for an Insert query, but provide the static "year" element?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
PARAMETERS [Data] Long;
Select [Data],Table.ID, Table.Name, Table.Something, table.SomeDate
from Table
where Year(Table.SomeDate) = [Data];
And then when you execute the saved query a dialog will pop-up asking for the value of [Data]. Is there a way to execute that query (especially if it is an action query) via VB where the parameter is provided by the code.
Example:
PARAMETERS [CurYear] LONG;
INSERT INTO tbl_Info (Year, ID1, ID2, Counts)
SELECT [CurYear], Tbl.ID1, Tbl.ID2, Tbl.Counts
From TBL;
so that on the action of the query I can combine the Select source for an Insert query, but provide the static "year" element?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner