[AccessD] Single and Double Inverted Commas!

Chris Enright cclenright at yahoo.com
Wed Nov 29 15:39:36 CST 2006


v\:* {behavior:url (#default#vml);}v\:* {	BEHAVIOR: url (#default#vml)}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
 
 
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
 
 

 
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.


More information about the AccessD mailing list