A.D.TEJPAL
adtp at airtelbroadband.in
Fri Dec 1 08:21:48 CST 2006
Chris,
If the problem is not yet resolved, you could try the following. It has been tested at my end:
If Len(strInitials) > 0 Then
Me.MonTotDBAdmin.ControlSource = _
"=DSum('DCAdminEventTime'," & _
" 'qry" & strInitials & "_Mon')"
End If
Best wishes,
A.D.Tejpal
---------------
----- Original Message -----
From: Chris Enright
To: Access Developers discussion and problem solving
Sent: Thursday, November 30, 2006 03:09
Subject: Re: [AccessD] Single and Double Inverted Commas!
Hi Gustav,
I love lazy!
Problem is though that there are 42 controls that I want to change depending on the "strInitials" picked up when the name of the member of staff is selected to open the form.
What I am looking for is the correct syntax for something like
Me.MonTotDBAdmin.ControlSource = "=DSum('DCAdminEventTime','qry" & strInitials & "_Mon')"
Which I know is completely wrong but I have forgotten how to use those %$*^"£$ "s and 's but would create
=DSum("DCAdminEventTime","qryEM_Mon") if strInitials="EM"
Chris
-------Original Message-------
From: Gustav Brock
Date: 29/11/2006 16:22:02
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Single and Double Inverted Commas!
Hi Chris
How about a lazy solution:
strControlSource = "=DSum('DCAdminEventTime','qryEM_Mon')"
Me.MonTotDBAdmin.ControlSource = Replace(strControlSource,"'","""")
/gustav
>>> cclenright at yahoo.com 29-11-2006 12:14:08 >>>
I am getting too old and have been away from programming far too long
I never have understood the use of " and ' completely
Could someone please correct this for me,
Me.MonTotDBAdmin.ControlSource =
and what I want it to equal is
=DSum("DCAdminEventTime","qryIG_Mon")
but with the IG being replaced with strInitials
My attempt with strInitials="EM" came out as =DSum('DCAdminEventTime','qryEM_Mon') and wouldn't work
Thanks
Chris