[AccessD] Using SET and Variable control names

Drew Wutka DWUTKA at Marlow.com
Thu Nov 13 20:48:41 CST 2008


Ummm, to the first part, you have it backwards....

Set MyVariable = MyExistingObject

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darryl
Collins
Sent: Thursday, November 13, 2008 8:43 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Using SET and Variable control names

Hi folks,

Friday and brain is fading... urrrgh

I have a line of code like this

[Forms]![ITFCT_frmRptPeriodSummary].[ITFCT_frmRptSubPeriodSummary_Opex].
[Form].txt4_1_P1.ControlSource = "=" & dblValue

Firstly what I want is to make this nice and compact like this:

Set
[Forms]![ITFCT_frmRptPeriodSummary2].[ITFCT_frmRptSubPeriodSummary_Opex]
.[Form] as frmTarget

which I am struggling to get to work.  bah.

also the control I want to build up out of variables like this

i = 4
j = 1
k = 1

CtrlSrcName = "txt" & i & "_" & j & "_P" & k (= "txt4_1_P1")

and then use

frmTarget.CtrlSrcName.ControlSource = "=" & dblValue

That all seems nice in aircode but darned if I can get it to work.

any advice?

Cheers
Darryl.

This email and any attachments may contain privileged and confidential
information
and are intended for the named addressee only. If you have received this
e-mail in
error, please notify the sender and delete this e-mail immediately. Any
confidentiality, privilege or copyright is not waived or lost because
this e-mail
has been sent to you in error. It is your responsibility to check this
e-mail and
any attachments for viruses.  No warranty is made that this material is
free from
computer virus or any other defect or error.  Any loss/damage incurred
by using this
material is not the sender's responsibility.  The sender's entire
liability will be
limited to resupplying the material.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list