P
Paul
Hi!
I wrote the code MediaCambi to run a query based to other
two queries named Count_Changes and Count_Days. It works
fine.
Now i want to delete the queries Count_Changes and
Count_Days and write code for have the same queries with
code and after to base the function MediaCambi to that
code
Somebody can help me...
Thanks in advance
Function MediaCambi()
Dim dbs As Database
Dim SQL As String
Dim qdf As QueryDef
Set dbs = CurrentDb
dbs.QueryDefs.Delete "rnsTemp"
SQL = "SELECT [Count_Changes].[N° Changes],
[Count_Days].[N° Days], [N° Changes]/[N° Giorni] AS
[Total] FROM [Count_Changes], [Count_Days];"
Set qdf = dbs.CreateQueryDef("rnsTemp", SQL)
Set rstClients = dbs.QueryDefs
("rnsTemp").OpenRecordset
DoCmd.OpenQuery "rnsTemp"
End Function
I wrote the code MediaCambi to run a query based to other
two queries named Count_Changes and Count_Days. It works
fine.
Now i want to delete the queries Count_Changes and
Count_Days and write code for have the same queries with
code and after to base the function MediaCambi to that
code
Somebody can help me...
Thanks in advance
Function MediaCambi()
Dim dbs As Database
Dim SQL As String
Dim qdf As QueryDef
Set dbs = CurrentDb
dbs.QueryDefs.Delete "rnsTemp"
SQL = "SELECT [Count_Changes].[N° Changes],
[Count_Days].[N° Days], [N° Changes]/[N° Giorni] AS
[Total] FROM [Count_Changes], [Count_Days];"
Set qdf = dbs.CreateQueryDef("rnsTemp", SQL)
Set rstClients = dbs.QueryDefs
("rnsTemp").OpenRecordset
DoCmd.OpenQuery "rnsTemp"
End Function