[AccessD] Can't reference control on sub-form

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Thu Jan 22 16:09:27 CST 2009


Dear List:

I have two subforms on a main form: sfrmUserMatterBillingRates and
sfrmMatterPayees.  When the record changes on sfrmUserMatterBillingRates  I
want to change the filter on sfrmMatterPayees.  I did this already on
another form with two other almost identical subforms and it works
perfectly.

But on this form when I refer to the control on sfrmUserMatterBillingRates
that I need the value of I get an error: "You entered an invalid reference
to the property Form/Report".  The line of code with the error is simply:

MsgBox Forms!Matters!sfrmUserMatterBillingRates!FindPersonName.Column(0)

Where FindPersonName is a combo box with a PK in column zero.

After that line, which is just for debug, I fetch the value from the subform
in a function:

Me.Filter = "fldMatterPayDistributionPayeeID = " &
GetsfrmUserMatterBillingRatesPersonID()

Where GetsfrmUserMatterBillingRatesPersonID() is a function with one line:

GetsfrmUserClientBillingRatesPersonID =
Forms!Clients!sfrmUserClientBillingRates!FindPersonID.Column(0)

And it generates the same error.  

I can't for the life of me figure out why it works on the other form and
fails on this one, but it does.  

Any suggestions of possible things to look at would be gratefully received.
I have very little hair left.


MTIA





 	
	
 

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 





More information about the AccessD mailing list