[AccessD] Single and Double Inverted Commas!

A.D.TEJPAL adtp at airtelbroadband.in
Sat Dec 2 08:11:18 CST 2006


Chris,

    Good. Well done!

    However, it needs to be reiterated that ControlSource for a control on a form can very well be manipulated at run time. Whenever a new value for this property is assigned at run time, it prevails over any value that might have been set in design view.

    The lifespan of new ControlSource assigned at run time is however limited only to the current run time instance of the form in question. As & when the form is closed, the ControlSource reverts to its original  value (if any) that was set at design stage. If the form is opened afresh, without run time interference to ControlSource property, the display will conform to the design setting for ControlSource.

Best wishes,
A.D.Tejpal
---------------

  ----- Original Message ----- 
  From: Chris Enright 
  To: Access Developers discussion and problem solving 
  Sent: Saturday, December 02, 2006 16:43
  Subject: Re: [AccessD] Single and Double Inverted Commas!


  Thanks AD,
   
  But having been told that ControlSources (for controls) can't be set other than in design Mode I solved the problem by appending the data to a temp table and just changing the Record Source. 
   
  Thanks anyway
   
  Chris

   
  -------Original Message-------
   
  From: A.D.TEJPAL
  Date: 12/01/06 14:30:45
  To: Access Developers discussion and problem solving
  Subject: Re: [AccessD] Single and Double Inverted Commas!
   
  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


More information about the AccessD mailing list