2011/06/12

access2010 Webデータベース その67 DatePicker再び -5-

** Office365beta(プランP1) 環境 **
ちょっと見直しをして、機能を少し追加
既定の日付がある場合、該当のコマンドボタンにフォーカスを移動。
とりあえずいったんまとめ。祝日とかも考えよう。
以降、データマクロ/マクロのメモ




<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<DataMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
  <DataMacro Name="GetData">
    <Parameters>
      <Parameter Name="paramDate" />
    </Parameters>
    <Statements>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclDate</Argument>
        <Argument Name="Value">[paramDate]</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclYear2</Argument>
        <Argument Name="Value">Year([lclDate])</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclMonth2</Argument>
        <Argument Name="Value">Month([lclDate])</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclDay2</Argument>
        <Argument Name="Value">Day([paramDate])</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDateOfMonth0</Argument>
        <Argument Name="Value">DateSerial([lclYear2],[lclMonth2]-1,0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDateOfMonth1</Argument>
        <Argument Name="Value">DateSerial([lclYear2],[lclMonth2],0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDateOfMonth2</Argument>
        <Argument Name="Value">DateSerial([lclYear2],[lclMonth2]+1,0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDateOfMonth3</Argument>
        <Argument Name="Value">DateSerial([lclYear2],[lclMonth2]+2,0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclYear1</Argument>
        <Argument Name="Value">FormatNumber(Year([EndDateOfMonth1]),0,0,0,0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclMonth1</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Month([EndDateOfMonth1]),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclYear2</Argument>
        <Argument Name="Value">FormatNumber([lclYear2],0,0,0,0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclMonth2</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber([lclMonth2],0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclYear3</Argument>
        <Argument Name="Value">FormatNumber(Year([EndDateOfMonth3]),0,0,0,0)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclMonth3</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Month([EndDateOfMonth3]),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDayOfMonth0</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([EndDateOfMonth0]),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDayOfMonth1</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([EndDateOfMonth1]),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDayOfMonth2</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([EndDateOfMonth2]),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">EndDayOfMonth3</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([EndDateOfMonth3]),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">FirstDateOfCalendar2</Argument>
        <Argument Name="Value">[EndDateOfMonth1]-Weekday([EndDateOfMonth1]+1)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">lclDefault</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber([lclDate]-[FirstDateOfCalendar2]-1,0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">FirstDayOfCalendar1</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([EndDateOfMonth0]-Weekday([EndDateOfMonth0]+1)+2),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">FirstDayOfCalendar2</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([FirstDateOfCalendar2]+2),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">FirstDayOfCalendar3</Argument>
        <Argument Name="Value">Right("0" &amp; FormatNumber(Day([EndDateOfMonth2]-Weekday([EndDateOfMonth2]+1)+2),0,0,0,0),2)</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">Var1</Argument>
        <Argument Name="Value">[lclYear1] &amp; [lclMonth1] &amp; [FirstDayOfCalendar1] &amp; [EndDayOfMonth0] &amp; [EndDayOfMonth1] &amp; "00"</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">Var2</Argument>
        <Argument Name="Value">[lclYear2] &amp; [lclMonth2] &amp; [FirstDayOfCalendar2] &amp; [EndDayOfMonth1] &amp; [EndDayOfMonth2] &amp; [lclDefault]</Argument>
      </Action>
      <Action Collapsed="true" Name="SetLocalVar">
        <Argument Name="Name">Var3</Argument>
        <Argument Name="Value">[lclYear3] &amp; [lclMonth3] &amp; [FirstDayOfCalendar3] &amp; [EndDayOfMonth2] &amp; [EndDayOfMonth3] &amp; "00"</Argument>
      </Action>
      <Action Collapsed="true" Name="SetReturnVar">
        <Argument Name="Name">GetData</Argument>
        <Argument Name="Value">[Var1] &amp; [Var2] &amp; [Var3]</Argument>
      </Action>
    </Statements>
  </DataMacro>
</DataMacros>
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
  <UserInterfaceMacro MinimumClientDesignVersion="14.0.0000.0000">
    <Statements />
    <Sub Name="GetData">
      <Statements>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclDate</Argument>
          <Argument Name="Expression">[TempVars]![DialogDatePickerForClient]</Argument>
        </Action>
        <Action Collapsed="true" Name="RemoveTempVar">
          <Argument Name="Name">DialogDatePickerForClient</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclYear2</Argument>
          <Argument Name="Expression">Year([LocalVars]![lclDate])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclMonth2</Argument>
          <Argument Name="Expression">Month([LocalVars]![lclDate])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclDay2</Argument>
          <Argument Name="Expression">Day([LocalVars]![lclDate])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDateOfMonth0</Argument>
          <Argument Name="Expression">DateSerial([LocalVars]![lclYear2],[LocalVars]![lclMonth2]-1,0)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDateOfMonth1</Argument>
          <Argument Name="Expression">DateSerial([LocalVars]![lclYear2],[LocalVars]![lclMonth2],0)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDateOfMonth2</Argument>
          <Argument Name="Expression">DateSerial([LocalVars]![lclYear2],[LocalVars]![lclMonth2]+1,0)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDateOfMonth3</Argument>
          <Argument Name="Expression">DateSerial([LocalVars]![lclYear2],[LocalVars]![lclMonth2]+2,0)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclYear1</Argument>
          <Argument Name="Expression">Format(Year([LocalVars]![EndDateOfMonth1]),"0000")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclMonth1</Argument>
          <Argument Name="Expression">Format(Month([LocalVars]![EndDateOfMonth1]),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclYear2</Argument>
          <Argument Name="Expression">Format([LocalVars]![lclYear1],"0000")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclMonth2</Argument>
          <Argument Name="Expression">Format([LocalVars]![lclMonth2],"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclYear3</Argument>
          <Argument Name="Expression">Format(Year([LocalVars]![EndDateOfMonth3]),"0000")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclMonth3</Argument>
          <Argument Name="Expression">Format(Month([LocalVars]![EndDateOfMonth3]),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDayOfMonth0</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![EndDateOfMonth0]),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDayOfMonth1</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![EndDateOfMonth1]),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDayOfMonth2</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![EndDateOfMonth2]),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EndDayOfMonth3</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![EndDateOfMonth3]),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">FirstDateOfCalendar2</Argument>
          <Argument Name="Expression">[LocalVars]![EndDateOfMonth1]-Weekday([LocalVars]![EndDateOfMonth1]+1)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lclDefault</Argument>
          <Argument Name="Expression">Format([LocalVars]![lclDate]-[LocalVars]![FirstDateOfCalendar2]-1,"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">FirstDayOfCalendar1</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![EndDateOfMonth0]-Weekday([LocalVars]![EndDateOfMonth0]+1)+2),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">FirstDayOfCalendar2</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![FirstDateOfCalendar2]+2),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">FirstDayOfCalendar3</Argument>
          <Argument Name="Expression">Format(Day([LocalVars]![EndDateOfMonth2]-Weekday([LocalVars]![EndDateOfMonth2]+1)+2),"00")</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">Var1</Argument>
          <Argument Name="Expression">[LocalVars]![lclYear1] &amp; [LocalVars]![lclMonth1] &amp; [LocalVars]![FirstDayOfCalendar1] &amp; [LocalVars]![EndDayOfMonth0] &amp; [LocalVars]![EndDayOfMonth1] &amp; "00"</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">Var2</Argument>
          <Argument Name="Expression">[LocalVars]![lclYear2] &amp; [LocalVars]![lclMonth2] &amp; [LocalVars]![FirstDayOfCalendar2] &amp; [LocalVars]![EndDayOfMonth1] &amp; [LocalVars]![EndDayOfMonth2] &amp; [LocalVars]![lclDefault]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">Var3</Argument>
          <Argument Name="Expression">[LocalVars]![lclYear3] &amp; [LocalVars]![lclMonth3] &amp; [LocalVars]![FirstDayOfCalendar3] &amp; [LocalVars]![EndDayOfMonth2] &amp; [LocalVars]![EndDayOfMonth3] &amp; "00"</Argument>
        </Action>
        <Action Collapsed="true" Name="SetTempVar">
          <Argument Name="Name">DialogDatePickerForClient</Argument>
          <Argument Name="Expression">[LocalVars]![Var1] &amp; [LocalVars]![Var2] &amp; [LocalVars]![Var3]</Argument>
        </Action>
      </Statements>
    </Sub>
  </UserInterfaceMacro>
</UserInterfaceMacros>
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
  <UserInterfaceMacro MinimumClientDesignVersion="14.0.0000.0000">
    <Statements />
    <Sub Collapsed="true" Name="Initialize">
      <Statements>
        <Action Collapsed="true" Name="SetTempVar">
          <Argument Name="Name">DefaultForeColor0</Argument>
          <Argument Name="Expression">[cmd01].[ForeColor]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetTempVar">
          <Argument Name="Name">DefaultForeColor1</Argument>
          <Argument Name="Expression">[cmd02].[ForeColor]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetTempVar">
          <Argument Name="Name">DefaultForeColor2</Argument>
          <Argument Name="Expression">[cmd07].[ForeColor]</Argument>
        </Action>
        <ConditionalBlock>
          <If>
            <Condition>IsClient()</Condition>
            <Statements>
              <Action Collapsed="true" Name="SetTempVar">
                <Argument Name="Name">lightgrey</Argument>
                <Argument Name="Expression">13882323</Argument>
              </Action>
            </Statements>
          </If>
          <Else>
            <Statements>
              <Action Collapsed="true" Name="SetTempVar">
                <Argument Name="Name">lightgrey</Argument>
                <Argument Name="Expression">"#d3d3d3"</Argument>
              </Action>
            </Statements>
          </Else>
        </ConditionalBlock>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd38</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=[TempVars]![lightgrey]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd39</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=[TempVars]![lightgrey]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd40</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=[TempVars]![lightgrey]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd41</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=[TempVars]![lightgrey]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd42</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=[TempVars]![lightgrey]</Argument>
        </Action>
      </Statements>
    </Sub>
    <Sub Collapsed="true" Name="SetCaption">
      <Statements>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">CurrentCaptions</Argument>
          <Argument Name="Expression">Mid([txtPreLoad],[txtPos]*14+1,14)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">lblYear</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=Left([LocalVars]![CurrentCaptions],4)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">lblMonth</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=CDbl(Mid([LocalVars]![CurrentCaptions],5,2))</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">FDC</Argument>
          <Argument Name="Expression">CDbl(Mid([LocalVars]![CurrentCaptions],7,2))</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EDLM</Argument>
          <Argument Name="Expression">CDbl(Mid([LocalVars]![CurrentCaptions],9,2))</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">EDM</Argument>
          <Argument Name="Expression">CDbl(Mid([LocalVars]![CurrentCaptions],11,2))</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd01</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![FDC]</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd02</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![FDC]+1&gt;[LocalVars]![EDLM],[LocalVars]![FDC]+1-[LocalVars]![EDLM],[LocalVars]![FDC]+1)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd03</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![FDC]+2&gt;[LocalVars]![EDLM],[LocalVars]![FDC]+2-[LocalVars]![EDLM],[LocalVars]![FDC]+2)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd04</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![FDC]+3&gt;[LocalVars]![EDLM],[LocalVars]![FDC]+3-[LocalVars]![EDLM],[LocalVars]![FDC]+3)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd05</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![FDC]+4&gt;[LocalVars]![EDLM],[LocalVars]![FDC]+4-[LocalVars]![EDLM],[LocalVars]![FDC]+4)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd06</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![FDC]+5&gt;[LocalVars]![EDLM],[LocalVars]![FDC]+5-[LocalVars]![EDLM],[LocalVars]![FDC]+5)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd07</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![FDC]+6&gt;[LocalVars]![EDLM],[LocalVars]![FDC]+6-[LocalVars]![EDLM],[LocalVars]![FDC]+6)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetLocalVar">
          <Argument Name="Name">lcl07</Argument>
          <Argument Name="Expression">CDbl([cmd07].[Caption])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd08</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+1</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd09</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+2</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd10</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+3</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd11</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+4</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd12</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+5</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd13</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+6</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd14</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+7</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd15</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+8</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd16</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+9</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd17</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+10</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd18</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+11</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd19</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+12</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd20</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+13</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd21</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+14</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd22</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+15</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd23</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+16</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd24</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+17</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd25</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+18</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd26</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+19</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd27</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+20</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd28</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=[LocalVars]![lcl07]+21</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd29</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+22&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+22-[LocalVars]![EDM],[LocalVars]![lcl07]+22)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd30</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+23&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+23-[LocalVars]![EDM],[LocalVars]![lcl07]+23)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd31</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+24&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+24-[LocalVars]![EDM],[LocalVars]![lcl07]+24)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd32</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+25&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+25-[LocalVars]![EDM],[LocalVars]![lcl07]+25)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd33</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+26&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+26-[LocalVars]![EDM],[LocalVars]![lcl07]+26)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd34</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+27&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+27-[LocalVars]![EDM],[LocalVars]![lcl07]+27)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd35</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+28&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+28-[LocalVars]![EDM],[LocalVars]![lcl07]+28)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd36</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+29&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+29-[LocalVars]![EDM],[LocalVars]![lcl07]+29)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd37</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+30&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+30-[LocalVars]![EDM],[LocalVars]![lcl07]+30)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd38</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+31&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+31-[LocalVars]![EDM],[LocalVars]![lcl07]+31)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd39</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+32&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+32-[LocalVars]![EDM],[LocalVars]![lcl07]+32)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd40</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+33&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+33-[LocalVars]![EDM],[LocalVars]![lcl07]+33)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd41</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+34&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+34-[LocalVars]![EDM],[LocalVars]![lcl07]+34)</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd42</Argument>
          <Argument Name="Property">Caption</Argument>
          <Argument Name="Value">=IIf([LocalVars]![lcl07]+35&gt;[LocalVars]![EDM],[LocalVars]![lcl07]+35-[LocalVars]![EDM],[LocalVars]![lcl07]+35)</Argument>
        </Action>
      </Statements>
    </Sub>
    <Sub Collapsed="true" Name="SetForeColor">
      <Statements>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd01</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd01].[Caption])&gt;20,[TempVars]![lightgrey],[TempVars]![DefaultForeColor0])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd02</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd02].[Caption])&gt;20,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd03</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd03].[Caption])&gt;20,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd04</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd04].[Caption])&gt;20,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd05</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd05].[Caption])&gt;20,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd06</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd06].[Caption])&gt;20,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd29</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd29].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor0])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd30</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd30].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd31</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd31].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd32</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd32].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd33</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd33].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd34</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd34].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd35</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd35].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor2])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd36</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd36].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor0])</Argument>
        </Action>
        <Action Collapsed="true" Name="SetProperty">
          <Argument Name="ControlName">cmd37</Argument>
          <Argument Name="Property">ForeColor</Argument>
          <Argument Name="Value">=IIf(CDbl([cmd37].[Caption])&lt;14,[TempVars]![lightgrey],[TempVars]![DefaultForeColor1])</Argument>
        </Action>
      </Statements>
    </Sub>
    <Sub Collapsed="true" Name="SetFocus">
      <Statements>
        <Action Collapsed="true" Name="GoToControl">
          <Argument Name="ControlName">="cmd" &amp; Mid([LocalVars]![CurrentCaptions],13,2)</Argument>
        </Action>
      </Statements>
    </Sub>
  </UserInterfaceMacro>
</UserInterfaceMacros>

0 件のコメント: