Re: Forcing a ReQuery
From: Michael Keating (michael.keating_at_[S$S$S)
Date: 07/01/04
- Next message: Michael Keating: "Re: Fixed positioning"
- Previous message: Mike: "RE: Not enough memory error"
- In reply to: Dkline: "Forcing a ReQuery"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 1 Jul 2004 17:22:40 +0100
Hi,
Sorry to be rather negative, but ..
I think you need to copy and paste the actual code here.
>From what you've posted we can assume that queries 3 and 4 utilise the
results of queries 1 and 2, but you appear to only use 3 and 4 to populate a
recordset which you immediately close and destroy.
I get the feeling that the problem is either going to be in the SQL for
queries 1 and 2, which you say works correctly, or in the fact that queries
3 and 4 appear to achieve nothing in this code.
Perhaps the actual procedure will make things clearer. Also a brief
explanation of what you want to happen would help (Modified Date ?? Who
modified that ?? <g>).
MFK.
"Dkline" <Dkline001@comcast.net> wrote in message
news:#rHgoS2XEHA.3944@tk2msftngp13.phx.gbl...
> I have four queries which are run in sequence. All are Select queries.
>
> #1 balance
> #2 prorated
> #3 calculated
> #4 summary
>
> For #1 and #2 I reset the SQL based on User Form entries. No problem with
> either one.
>
> #3 and #4 are just to be run - no resetting SQL or anything else. Just
> update. Doesn't do it. Modifed date doesn't change.
>
> I've tried forcing the issue by doing a MoveLast and a Requery.
>
> I'm out of ideas.
>
> Code is:
>
> Dim strSQL As String
> Dim dbs As DAO.Database
> Dim qdf As DAO.QueryDef
> Dim rst As DAO.Recordset
>
> Set dbs = CurrentDb
>
> '#1
> 'qry_balance
> 'reset the SQL to the user form dates
> BuildSQLStringWHERE(strSQL)
> dbs.QueryDefs("qrybalance").SQL = strSQL
>
> #2
> 'qryprorated
> 'reset the SQL to the user form dates
> BuildSQLStringHAVING(strSQL)
> dbs.QueryDefs("qryproratedc").SQL = strSQL
>
> #3
> 'open qrycalculation
> Set qdf = dbs.QueryDefs("qrycalculation")
> Set rst = qdf.OpenRecordset(dbOpenDynaset)
> rst.MoveLast
> rst.Requery
> rst.Close
> Set rst = Nothing
> Set qdf = Nothing
>
> #4
> 'open qrysummary
> Set qdf = dbs.QueryDefs("qrysummary")
> Set rst = qdf.OpenRecordset(dbOpenDynaset)
> rst.MoveLast
> rst.Requery
> rst.Close
>
> Set rst = Nothing
> Set qdf = Nothing
> Set dbs = Nothing
>
>
- Next message: Michael Keating: "Re: Fixed positioning"
- Previous message: Mike: "RE: Not enough memory error"
- In reply to: Dkline: "Forcing a ReQuery"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|