[AccessD] Control reference question.

Gustav Brock Gustav at cactus.dk
Fri Nov 19 09:33:27 CST 2004


Hi Bobby
 
Always use the syntax stated here (one line):
 
http://www.databaseadvisors.com/newletters/newsletter032004/0310ReferenceGuide/SyntaxForSubs.htm
 
Other methods may work (as you have demonstrated) but they are
generally not considered good programming practice.
 
"Svar:" is Danish for "Re:". We have moved to a brand new GroupWise 6.5
system (boy, this rocks) and currently I'm running the Danish
localisation ... haven't found out yet how to adjust this detail.
 
/gustav


>>> bheid at appdevgrp.com 18-11-2004 19:26:38 >>>

Gustav,

Yes, that works also.  Why would I need to put .Report on the end?  It
already knows it is in the Reports collection?  

I have never seen anything like that when referencing something on a
form
either?  Is there a .Form for the forms?

Also, what is Svar in the subject?

Thanks,
Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav
Brock
Sent: Thursday, November 18, 2004 12:37 PM
To: accessd at databaseadvisors.com
Subject: Svar: RE: [AccessD] Control reference question.


Hi Bobby

What happens if you try?
The use of .Report should be the recommended syntax ...

/gustav

>>> bheid at appdevgrp.com 18-11-2004 17:30:50 >>>

I dunno, it works as I have it.  I have never used Report on the end
like
you have it.

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav
Brock
Sent: Thursday, November 18, 2004 11:09 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Control reference question.


Hi Bobby

Shouldn't it read:

   With Reports!Closeout!Closeout_GL_sub.Report
      If !txtSetBold <> 0 Then
         !txtGLEstPayroll.FONTBOLD = True
         !txtGLFinalPayroll.FONTBOLD = True
      Else
         !txtGLEstPayroll.FONTBOLD = False
         !txtGLFinalPayroll.FONTBOLD = False
      End If
   End With

/gustav

>>> bheid at appdevgrp.com 18-11-2004 16:53:24 >>>

Now this is really weird.  I played with it for over an hour yesterday
and
could not get it to work no matter how I changed it.  I went back in a
few
minutes ago and changed the code from:


   With Reports!Closeout!Closeout_GL_sub
      If txtSetBold <> 0 Then
         !txtGLEstPayroll.FONTBOLD = True
         !txtGLFinalPayroll.FONTBOLD = True
         Else
            !txtGLEstPayroll.FONTBOLD = False
            !txtGLFinalPayroll.FONTBOLD = False
         End If
      End With

TO 


   With Reports!Closeout!Closeout_GL_sub
      If txtSetBold <> 0 Then
         txtGLEstPayroll.FONTBOLD = True
         txtGLFinalPayroll.FONTBOLD = True
         Else
            txtGLEstPayroll.FONTBOLD = False
            txtGLFinalPayroll.FONTBOLD = False
         End If
      End With

And it now works.  I hate it when Access does this to me.

Thanks all.

Bobby




More information about the AccessD mailing list