[AccessD] Expression not working in text box

StaRKeY starkey at wanadoo.nl
Thu Jun 30 17:02:46 CDT 2005


Susan, 

I understand you use the code in the immediate window however what does the
code in your mainform look like? 

It's my understanding that the code in your mainform would look like this: 
'subform.Form.RecordsetClone.RecordCount' without the 'Forms!mainform!'
since you are already in this form and you only need to reference the
subform, hope this helps. Ofcourse in the immediate window you would need
the reference to the mainform since the focus is not on the mainform then...

The only other thing I can think of what might be troubling is the
recordcount property... I am not sure if this still is needed in 2003 but I
am used to do a movelast and a movefirst to populate the recordset to be
able to get a proper recordcount but ohwell:-) My first guess is the line of
code from what you posted is too long for the mainform.

Let me know whether I am close to the solution ok? If not I'll make my own
sample here in 2003!;-) 

Good luck, 
Eric Starkenburg 

-----Oorspronkelijk bericht----- 
Van: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] Namens Susan Harkins 
Verzonden: donderdag 23 juni 2005 14:50 
Aan: 'Access Developers discussion and problem solving' 
Onderwerp: [AccessD] Expression not working in text box 

=Forms!mainform!subform.Form.RecordsetClone.RecordCount 
  
I've used the above expression before, in a main form, to return a count of
the records in a subform. It isn't working in 2003. It works in the
Immediate window, so I have no clue what the problem is. :( 

  
I know I can just use Count(*) in the subform and reference that control --
and I will if I have to in the end -- but anyone know what they above won't
work in 2003? 

  
Susan H. 
-- 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 



  _____  

avast! Antivirus <http://www.avast.com> : Uitgaande bericht is niet besmet. 


Virus Gegevensbestand (VPS): 0526-3, 30-06-2005
Getest op: 1-7-2005 0:02:46
avast! auteursrecht (c) 1988-2005 ALWIL Software.






More information about the AccessD mailing list