can't call Get Property of form in a query in Access2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've converted an Access2000 database to Access2003. I have several queries
calling Get Property that no longer work.
 
Hi,


You have a simple example of the syntax you use?


Hoping it may help,
Vanderghast, Access MVP
 
VBA code behind form:
Public Property Get CustWO() As Long
#If Not CC_DEBUG Then
On Error GoTo ErrProc
#End If

CustWO = Me.sfrWorkOrder.Form!WorkOrderID

ExitProc:
Exit Property
ErrProc:
ErrMsg Err.Number, Err.Description, "CustWO"
Resume ExitProc
End Property

SQL for query :

SELECT tblWorkOrder.*
FROM tblWorkOrder
WHERE (((tblWorkOrder.WorkOrderID)=[Forms]![frmCustomer].[CustWO]));
 
Hi,


Sounds broken.

A way around is to make a public function in a standard module, that returns
that property, and, in the query, to call the function.

'= in a module =============
Public Function Fxyz() As Double
Fxyz = Forms!Form26.xyz
End Function
-========================


'== in the query ============
.... WHERE fieldname = Fxyz()
'=======================



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top