northy,
unfortunatly it is not possible to reference a vb variable directly from a query. however there is a simple work-around...
you can reference user-defined functions from inside a query, so you could create a function to act as a wrapper for the variable you wish to use in your query. the function must be stored in a standard vba module, and it must be public.
___________________________________
Dim intID As Integer
Public Function GetID() As Integer
GetID = intID
End Function
___________________________________
you could then update your sql statment like so
([PRS Project Details].[Project Ref])= GetID()
and when you run your query, it will use the current value stored in intID for its criteria value.
Hope that helps
axa
[This message has been edited by axa (edited 08-23-2001).]