Calculation Form Field

Hi everyone.

I have hit a problem with a protected form I'm working with.

I have a macro that allows users to add a new row to a table within the 
protected form, the macro adds formfields in to the new row, one of which is 
a calculation field.

This calcuation field simply multiplies the previous two fields contents 
using cell references (i.e. b1 * c1, however this unfortunately does not seem 
to work when the form is reprotected and contents entered into b1/c1 etc.

I have checked the expression that I am generating to the new field, and 
that calculate on exit is set to true, but no joy.

The funny thing is that when I unlock the form then check the calcualtion 
field properties, and then click OK, the calculation field displays the right 
result.

Below is the code I'm using, any help would be greatly appreciated.

Private Sub CommandButton1_Click()

Dim oTable As Table
Dim sPassword, sDefault As String
Dim iRowCount As Integer

Application.ScreenUpdating = False

sPassword = "Gatekeeper1"
    
With ActiveDocument
If .ProtectionType <> wdNoProtection Then
    .Unprotect sPassword
End If
End With

Set oTable = ActiveDocument.Tables(6)

oTable.Rows.Add
iRow = oTable.Rows.Count

oTable.Cell(iRow, 1).Select
Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
        oTable.Cell(iRow, 1).Select
        With Selection.FormFields(1)
            With .TextInput
                .EditType wdRegularText, Format:="First capital"
            End With
        End With
oTable.Cell(iRow, 2).Select
Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
        oTable.Cell(iRow, 2).Select
        With Selection.FormFields(1)
            .CalculateOnExit = True
            With .TextInput
                .EditType wdNumberText, Format:="0"
            End With
        End With
oTable.Cell(iRow, 3).Select
Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
        oTable.Cell(iRow, 3).Select
        With Selection.FormFields(1)
            .ExitMacro = "UpdateField"
            .CalculateOnExit = True
            With .TextInput
                .EditType wdNumberText, Format:="0"
            End With
        End With
oTable.Cell(iRow, 4).Select
Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput
oTable.Cell(iRow, 4).Select
iRowCount = oTable.Rows.Count
sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
        With Selection.FormFields(1)
            .TextInput.EditType Type:=wdCalculationText, Format:="", 
Enabled:=False
            .CalculateOnExit = True
            .TextInput.Default = sDefault
        End With
oTable.Cell(iRow, 5).Select
        Selection.FormFields.Add Range:=Selection.Range, 
Type:=wdFieldFormTextInput
oTable.Cell(iRow, 5).Select
        With Selection.FormFields(1)
            With .TextInput
                .EditType wdRegularText, Format:="First capital"
            End With
        End With
oTable.Cell(iRow, 6).Select
        Selection.FormFields.Add Range:=Selection.Range, 
Type:=wdFieldFormTextInput
oTable.Cell(iRow, 6).Select
        With Selection.FormFields(1)
            With .TextInput
                .EditType wdRegularText, Format:="First capital"
            End With
        End With
oTable.Cell(iRow, 7).Select
        Selection.FormFields.Add Range:=Selection.Range, 
Type:=wdFieldFormTextInput
oTable.Cell(iRow, 7).Select
        With Selection.FormFields(1)
            With .TextInput
                .EditType wdRegularText, Format:="Title Case"
            End With
        End With

oTable.Cell(iRow, 1).Select
Unload Me
ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword, 
noreset:=True

Application.ScreenUpdating = True
End Sub
0
Utf
11/25/2009 1:31:01 PM
word.vba.general 1023 articles. 1 followers. Follow

9 Replies
1586 Views

Similar Articles

[PageSpeed] 35

Does the following make any difference?

With Selection.FormFields(1)
  .TextInput.EditType Type:=wdCalculationText, Default:=sDefault, 
Format:="", Enabled:=False
  .CalculateOnExit = True
End With

Peter Jamieson

"spunkymuffmonkey" <spunkymuffmonkey@discussions.microsoft.com> wrote in 
message news:0F1B4B0B-E39B-4C9C-8E73-E925E12B3CAA@microsoft.com...
> Hi everyone.
>
> I have hit a problem with a protected form I'm working with.
>
> I have a macro that allows users to add a new row to a table within the
> protected form, the macro adds formfields in to the new row, one of which 
> is
> a calculation field.
>
> This calcuation field simply multiplies the previous two fields contents
> using cell references (i.e. b1 * c1, however this unfortunately does not 
> seem
> to work when the form is reprotected and contents entered into b1/c1 etc.
>
> I have checked the expression that I am generating to the new field, and
> that calculate on exit is set to true, but no joy.
>
> The funny thing is that when I unlock the form then check the calcualtion
> field properties, and then click OK, the calculation field displays the 
> right
> result.
>
> Below is the code I'm using, any help would be greatly appreciated.
>
> Private Sub CommandButton1_Click()
>
> Dim oTable As Table
> Dim sPassword, sDefault As String
> Dim iRowCount As Integer
>
> Application.ScreenUpdating = False
>
> sPassword = "Gatekeeper1"
>
> With ActiveDocument
> If .ProtectionType <> wdNoProtection Then
>    .Unprotect sPassword
> End If
> End With
>
> Set oTable = ActiveDocument.Tables(6)
>
> oTable.Rows.Add
> iRow = oTable.Rows.Count
>
> oTable.Cell(iRow, 1).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
>        oTable.Cell(iRow, 1).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 2).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
>        oTable.Cell(iRow, 2).Select
>        With Selection.FormFields(1)
>            .CalculateOnExit = True
>            With .TextInput
>                .EditType wdNumberText, Format:="0"
>            End With
>        End With
> oTable.Cell(iRow, 3).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
>        oTable.Cell(iRow, 3).Select
>        With Selection.FormFields(1)
>            .ExitMacro = "UpdateField"
>            .CalculateOnExit = True
>            With .TextInput
>                .EditType wdNumberText, Format:="0"
>            End With
>        End With
> oTable.Cell(iRow, 4).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 4).Select
> iRowCount = oTable.Rows.Count
> sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
>        With Selection.FormFields(1)
>            .TextInput.EditType Type:=wdCalculationText, Format:="",
> Enabled:=False
>            .CalculateOnExit = True
>            .TextInput.Default = sDefault
>        End With
> oTable.Cell(iRow, 5).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 5).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 6).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 6).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 7).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 7).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="Title Case"
>            End With
>        End With
>
> oTable.Cell(iRow, 1).Select
> Unload Me
> ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> noreset:=True
>
> Application.ScreenUpdating = True
> End Sub 


0
MS
11/25/2009 8:10:00 PM
The             .CalculateOnExit = True

needs to be set for the formfields that contribute to the calculation, not 
the one that performs the calculation.

-- 
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"spunkymuffmonkey" <spunkymuffmonkey@discussions.microsoft.com> wrote in 
message news:0F1B4B0B-E39B-4C9C-8E73-E925E12B3CAA@microsoft.com...
> Hi everyone.
>
> I have hit a problem with a protected form I'm working with.
>
> I have a macro that allows users to add a new row to a table within the
> protected form, the macro adds formfields in to the new row, one of which 
> is
> a calculation field.
>
> This calcuation field simply multiplies the previous two fields contents
> using cell references (i.e. b1 * c1, however this unfortunately does not 
> seem
> to work when the form is reprotected and contents entered into b1/c1 etc.
>
> I have checked the expression that I am generating to the new field, and
> that calculate on exit is set to true, but no joy.
>
> The funny thing is that when I unlock the form then check the calcualtion
> field properties, and then click OK, the calculation field displays the 
> right
> result.
>
> Below is the code I'm using, any help would be greatly appreciated.
>
> Private Sub CommandButton1_Click()
>
> Dim oTable As Table
> Dim sPassword, sDefault As String
> Dim iRowCount As Integer
>
> Application.ScreenUpdating = False
>
> sPassword = "Gatekeeper1"
>
> With ActiveDocument
> If .ProtectionType <> wdNoProtection Then
>    .Unprotect sPassword
> End If
> End With
>
> Set oTable = ActiveDocument.Tables(6)
>
> oTable.Rows.Add
> iRow = oTable.Rows.Count
>
> oTable.Cell(iRow, 1).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
>        oTable.Cell(iRow, 1).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 2).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
>        oTable.Cell(iRow, 2).Select
>        With Selection.FormFields(1)
>            .CalculateOnExit = True
>            With .TextInput
>                .EditType wdNumberText, Format:="0"
>            End With
>        End With
> oTable.Cell(iRow, 3).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
>        oTable.Cell(iRow, 3).Select
>        With Selection.FormFields(1)
>            .ExitMacro = "UpdateField"
>            .CalculateOnExit = True
>            With .TextInput
>                .EditType wdNumberText, Format:="0"
>            End With
>        End With
> oTable.Cell(iRow, 4).Select
> Selection.FormFields.Add Range:=Selection.Range, 
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 4).Select
> iRowCount = oTable.Rows.Count
> sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
>        With Selection.FormFields(1)
>            .TextInput.EditType Type:=wdCalculationText, Format:="",
> Enabled:=False
>            .CalculateOnExit = True
>            .TextInput.Default = sDefault
>        End With
> oTable.Cell(iRow, 5).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 5).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 6).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 6).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 7).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 7).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="Title Case"
>            End With
>        End With
>
> oTable.Cell(iRow, 1).Select
> Unload Me
> ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> noreset:=True
>
> Application.ScreenUpdating = True
> End Sub 

0
Doug
11/26/2009 1:47:33 AM
Thanks for the info, the contributing fields are set to calc on exit, but 
still no joy!



"Doug Robbins - Word MVP" wrote:

> The             .CalculateOnExit = True
> 
> needs to be set for the formfields that contribute to the calculation, not 
> the one that performs the calculation.
> 
> -- 
> Hope this helps,
> 
> Doug Robbins - Word MVP
> 
> Please reply only to the newsgroups unless you wish to obtain my services on
> a paid professional basis.
> 
> "spunkymuffmonkey" <spunkymuffmonkey@discussions.microsoft.com> wrote in 
> message news:0F1B4B0B-E39B-4C9C-8E73-E925E12B3CAA@microsoft.com...
> > Hi everyone.
> >
> > I have hit a problem with a protected form I'm working with.
> >
> > I have a macro that allows users to add a new row to a table within the
> > protected form, the macro adds formfields in to the new row, one of which 
> > is
> > a calculation field.
> >
> > This calcuation field simply multiplies the previous two fields contents
> > using cell references (i.e. b1 * c1, however this unfortunately does not 
> > seem
> > to work when the form is reprotected and contents entered into b1/c1 etc.
> >
> > I have checked the expression that I am generating to the new field, and
> > that calculate on exit is set to true, but no joy.
> >
> > The funny thing is that when I unlock the form then check the calcualtion
> > field properties, and then click OK, the calculation field displays the 
> > right
> > result.
> >
> > Below is the code I'm using, any help would be greatly appreciated.
> >
> > Private Sub CommandButton1_Click()
> >
> > Dim oTable As Table
> > Dim sPassword, sDefault As String
> > Dim iRowCount As Integer
> >
> > Application.ScreenUpdating = False
> >
> > sPassword = "Gatekeeper1"
> >
> > With ActiveDocument
> > If .ProtectionType <> wdNoProtection Then
> >    .Unprotect sPassword
> > End If
> > End With
> >
> > Set oTable = ActiveDocument.Tables(6)
> >
> > oTable.Rows.Add
> > iRow = oTable.Rows.Count
> >
> > oTable.Cell(iRow, 1).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 1).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 2).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 2).Select
> >        With Selection.FormFields(1)
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 3).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 3).Select
> >        With Selection.FormFields(1)
> >            .ExitMacro = "UpdateField"
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 4).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 4).Select
> > iRowCount = oTable.Rows.Count
> > sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
> >        With Selection.FormFields(1)
> >            .TextInput.EditType Type:=wdCalculationText, Format:="",
> > Enabled:=False
> >            .CalculateOnExit = True
> >            .TextInput.Default = sDefault
> >        End With
> > oTable.Cell(iRow, 5).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 5).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 6).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 6).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 7).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 7).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="Title Case"
> >            End With
> >        End With
> >
> > oTable.Cell(iRow, 1).Select
> > Unload Me
> > ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> > noreset:=True
> >
> > Application.ScreenUpdating = True
> > End Sub 
> 
0
Utf
11/27/2009 10:14:01 AM
Unfortunately not, but thanks for your suggestion!

"MS Public" wrote:

> Does the following make any difference?
> 
> With Selection.FormFields(1)
>   .TextInput.EditType Type:=wdCalculationText, Default:=sDefault, 
> Format:="", Enabled:=False
>   .CalculateOnExit = True
> End With
> 
> Peter Jamieson
> 
> "spunkymuffmonkey" <spunkymuffmonkey@discussions.microsoft.com> wrote in 
> message news:0F1B4B0B-E39B-4C9C-8E73-E925E12B3CAA@microsoft.com...
> > Hi everyone.
> >
> > I have hit a problem with a protected form I'm working with.
> >
> > I have a macro that allows users to add a new row to a table within the
> > protected form, the macro adds formfields in to the new row, one of which 
> > is
> > a calculation field.
> >
> > This calcuation field simply multiplies the previous two fields contents
> > using cell references (i.e. b1 * c1, however this unfortunately does not 
> > seem
> > to work when the form is reprotected and contents entered into b1/c1 etc.
> >
> > I have checked the expression that I am generating to the new field, and
> > that calculate on exit is set to true, but no joy.
> >
> > The funny thing is that when I unlock the form then check the calcualtion
> > field properties, and then click OK, the calculation field displays the 
> > right
> > result.
> >
> > Below is the code I'm using, any help would be greatly appreciated.
> >
> > Private Sub CommandButton1_Click()
> >
> > Dim oTable As Table
> > Dim sPassword, sDefault As String
> > Dim iRowCount As Integer
> >
> > Application.ScreenUpdating = False
> >
> > sPassword = "Gatekeeper1"
> >
> > With ActiveDocument
> > If .ProtectionType <> wdNoProtection Then
> >    .Unprotect sPassword
> > End If
> > End With
> >
> > Set oTable = ActiveDocument.Tables(6)
> >
> > oTable.Rows.Add
> > iRow = oTable.Rows.Count
> >
> > oTable.Cell(iRow, 1).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 1).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 2).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 2).Select
> >        With Selection.FormFields(1)
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 3).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 3).Select
> >        With Selection.FormFields(1)
> >            .ExitMacro = "UpdateField"
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 4).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 4).Select
> > iRowCount = oTable.Rows.Count
> > sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
> >        With Selection.FormFields(1)
> >            .TextInput.EditType Type:=wdCalculationText, Format:="",
> > Enabled:=False
> >            .CalculateOnExit = True
> >            .TextInput.Default = sDefault
> >        End With
> > oTable.Cell(iRow, 5).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 5).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 6).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 6).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 7).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 7).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="Title Case"
> >            End With
> >        End With
> >
> > oTable.Cell(iRow, 1).Select
> > Unload Me
> > ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> > noreset:=True
> >
> > Application.ScreenUpdating = True
> > End Sub 
> 
> 
> .
> 
0
Utf
11/27/2009 10:18:03 AM
Hi, have solved the issue by inserting a field instead of a formfield, just 
to let you know in case you're trying to find a solution.

Many thanks again for your guidance.

"Doug Robbins - Word MVP" wrote:

> The             .CalculateOnExit = True
> 
> needs to be set for the formfields that contribute to the calculation, not 
> the one that performs the calculation.
> 
> -- 
> Hope this helps,
> 
> Doug Robbins - Word MVP
> 
> Please reply only to the newsgroups unless you wish to obtain my services on
> a paid professional basis.
> 
> "spunkymuffmonkey" <spunkymuffmonkey@discussions.microsoft.com> wrote in 
> message news:0F1B4B0B-E39B-4C9C-8E73-E925E12B3CAA@microsoft.com...
> > Hi everyone.
> >
> > I have hit a problem with a protected form I'm working with.
> >
> > I have a macro that allows users to add a new row to a table within the
> > protected form, the macro adds formfields in to the new row, one of which 
> > is
> > a calculation field.
> >
> > This calcuation field simply multiplies the previous two fields contents
> > using cell references (i.e. b1 * c1, however this unfortunately does not 
> > seem
> > to work when the form is reprotected and contents entered into b1/c1 etc.
> >
> > I have checked the expression that I am generating to the new field, and
> > that calculate on exit is set to true, but no joy.
> >
> > The funny thing is that when I unlock the form then check the calcualtion
> > field properties, and then click OK, the calculation field displays the 
> > right
> > result.
> >
> > Below is the code I'm using, any help would be greatly appreciated.
> >
> > Private Sub CommandButton1_Click()
> >
> > Dim oTable As Table
> > Dim sPassword, sDefault As String
> > Dim iRowCount As Integer
> >
> > Application.ScreenUpdating = False
> >
> > sPassword = "Gatekeeper1"
> >
> > With ActiveDocument
> > If .ProtectionType <> wdNoProtection Then
> >    .Unprotect sPassword
> > End If
> > End With
> >
> > Set oTable = ActiveDocument.Tables(6)
> >
> > oTable.Rows.Add
> > iRow = oTable.Rows.Count
> >
> > oTable.Cell(iRow, 1).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 1).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 2).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 2).Select
> >        With Selection.FormFields(1)
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 3).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 3).Select
> >        With Selection.FormFields(1)
> >            .ExitMacro = "UpdateField"
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 4).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 4).Select
> > iRowCount = oTable.Rows.Count
> > sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
> >        With Selection.FormFields(1)
> >            .TextInput.EditType Type:=wdCalculationText, Format:="",
> > Enabled:=False
> >            .CalculateOnExit = True
> >            .TextInput.Default = sDefault
> >        End With
> > oTable.Cell(iRow, 5).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 5).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 6).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 6).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 7).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 7).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="Title Case"
> >            End With
> >        End With
> >
> > oTable.Cell(iRow, 1).Select
> > Unload Me
> > ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> > noreset:=True
> >
> > Application.ScreenUpdating = True
> > End Sub 
> 
0
Utf
11/27/2009 10:28:01 AM
Hi, have solved the issue by inserting a field instead of a formfield, just 
to let you know in case you're trying to find a solution.

Many thanks again for your guidance.

"MS Public" wrote:

> Does the following make any difference?
> 
> With Selection.FormFields(1)
>   .TextInput.EditType Type:=wdCalculationText, Default:=sDefault, 
> Format:="", Enabled:=False
>   .CalculateOnExit = True
> End With
> 
> Peter Jamieson
> 
> "spunkymuffmonkey" <spunkymuffmonkey@discussions.microsoft.com> wrote in 
> message news:0F1B4B0B-E39B-4C9C-8E73-E925E12B3CAA@microsoft.com...
> > Hi everyone.
> >
> > I have hit a problem with a protected form I'm working with.
> >
> > I have a macro that allows users to add a new row to a table within the
> > protected form, the macro adds formfields in to the new row, one of which 
> > is
> > a calculation field.
> >
> > This calcuation field simply multiplies the previous two fields contents
> > using cell references (i.e. b1 * c1, however this unfortunately does not 
> > seem
> > to work when the form is reprotected and contents entered into b1/c1 etc.
> >
> > I have checked the expression that I am generating to the new field, and
> > that calculate on exit is set to true, but no joy.
> >
> > The funny thing is that when I unlock the form then check the calcualtion
> > field properties, and then click OK, the calculation field displays the 
> > right
> > result.
> >
> > Below is the code I'm using, any help would be greatly appreciated.
> >
> > Private Sub CommandButton1_Click()
> >
> > Dim oTable As Table
> > Dim sPassword, sDefault As String
> > Dim iRowCount As Integer
> >
> > Application.ScreenUpdating = False
> >
> > sPassword = "Gatekeeper1"
> >
> > With ActiveDocument
> > If .ProtectionType <> wdNoProtection Then
> >    .Unprotect sPassword
> > End If
> > End With
> >
> > Set oTable = ActiveDocument.Tables(6)
> >
> > oTable.Rows.Add
> > iRow = oTable.Rows.Count
> >
> > oTable.Cell(iRow, 1).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 1).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 2).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 2).Select
> >        With Selection.FormFields(1)
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 3).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> >        oTable.Cell(iRow, 3).Select
> >        With Selection.FormFields(1)
> >            .ExitMacro = "UpdateField"
> >            .CalculateOnExit = True
> >            With .TextInput
> >                .EditType wdNumberText, Format:="0"
> >            End With
> >        End With
> > oTable.Cell(iRow, 4).Select
> > Selection.FormFields.Add Range:=Selection.Range, 
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 4).Select
> > iRowCount = oTable.Rows.Count
> > sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
> >        With Selection.FormFields(1)
> >            .TextInput.EditType Type:=wdCalculationText, Format:="",
> > Enabled:=False
> >            .CalculateOnExit = True
> >            .TextInput.Default = sDefault
> >        End With
> > oTable.Cell(iRow, 5).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 5).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 6).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 6).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="First capital"
> >            End With
> >        End With
> > oTable.Cell(iRow, 7).Select
> >        Selection.FormFields.Add Range:=Selection.Range,
> > Type:=wdFieldFormTextInput
> > oTable.Cell(iRow, 7).Select
> >        With Selection.FormFields(1)
> >            With .TextInput
> >                .EditType wdRegularText, Format:="Title Case"
> >            End With
> >        End With
> >
> > oTable.Cell(iRow, 1).Select
> > Unload Me
> > ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> > noreset:=True
> >
> > Application.ScreenUpdating = True
> > End Sub 
> 
> 
> .
> 
0
Utf
11/27/2009 10:29:01 AM
It should work if you multiplied the bookmark names of the cells, however 
then you need to have more control over your cell naming, as rows are being 
added - see the two examples at http://www.gmayor.com/word_vba_examples.htm

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



spunkymuffmonkey wrote:
> Hi everyone.
>
> I have hit a problem with a protected form I'm working with.
>
> I have a macro that allows users to add a new row to a table within
> the protected form, the macro adds formfields in to the new row, one
> of which is a calculation field.
>
> This calcuation field simply multiplies the previous two fields
> contents using cell references (i.e. b1 * c1, however this
> unfortunately does not seem to work when the form is reprotected and
> contents entered into b1/c1 etc.
>
> I have checked the expression that I am generating to the new field,
> and that calculate on exit is set to true, but no joy.
>
> The funny thing is that when I unlock the form then check the
> calcualtion field properties, and then click OK, the calculation
> field displays the right result.
>
> Below is the code I'm using, any help would be greatly appreciated.
>
> Private Sub CommandButton1_Click()
>
> Dim oTable As Table
> Dim sPassword, sDefault As String
> Dim iRowCount As Integer
>
> Application.ScreenUpdating = False
>
> sPassword = "Gatekeeper1"
>
> With ActiveDocument
> If .ProtectionType <> wdNoProtection Then
>    .Unprotect sPassword
> End If
> End With
>
> Set oTable = ActiveDocument.Tables(6)
>
> oTable.Rows.Add
> iRow = oTable.Rows.Count
>
> oTable.Cell(iRow, 1).Select
> Selection.FormFields.Add Range:=Selection.Range,
>        Type:=wdFieldFormTextInput oTable.Cell(iRow, 1).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 2).Select
> Selection.FormFields.Add Range:=Selection.Range,
>        Type:=wdFieldFormTextInput oTable.Cell(iRow, 2).Select
>        With Selection.FormFields(1)
>            .CalculateOnExit = True
>            With .TextInput
>                .EditType wdNumberText, Format:="0"
>            End With
>        End With
> oTable.Cell(iRow, 3).Select
> Selection.FormFields.Add Range:=Selection.Range,
>        Type:=wdFieldFormTextInput oTable.Cell(iRow, 3).Select
>        With Selection.FormFields(1)
>            .ExitMacro = "UpdateField"
>            .CalculateOnExit = True
>            With .TextInput
>                .EditType wdNumberText, Format:="0"
>            End With
>        End With
> oTable.Cell(iRow, 4).Select
> Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput oTable.Cell(iRow, 4).Select
> iRowCount = oTable.Rows.Count
> sDefault = "=b" & iRowCount & "*" & "c" & iRowCount
>        With Selection.FormFields(1)
>            .TextInput.EditType Type:=wdCalculationText, Format:="",
> Enabled:=False
>            .CalculateOnExit = True
>            .TextInput.Default = sDefault
>        End With
> oTable.Cell(iRow, 5).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 5).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 6).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 6).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="First capital"
>            End With
>        End With
> oTable.Cell(iRow, 7).Select
>        Selection.FormFields.Add Range:=Selection.Range,
> Type:=wdFieldFormTextInput
> oTable.Cell(iRow, 7).Select
>        With Selection.FormFields(1)
>            With .TextInput
>                .EditType wdRegularText, Format:="Title Case"
>            End With
>        End With
>
> oTable.Cell(iRow, 1).Select
> Unload Me
> ActiveDocument.Protect wdAllowOnlyFormFields, Password:=sPassword,
> noreset:=True
>
> Application.ScreenUpdating = True
> End Sub 


0
Graham
11/27/2009 1:40:52 PM
FWIW I had exactly the same problem as the OP when I tried his code, but 
outside the context of a userform, on Word 2007 SP2 on Vista.
The first thing I tried was to change the calculation from using cell 
addresses to formfield names, but it made no difference. What did makeit 
work was the change I mentioned earlier - that works here with either 
type of addressing. Precisely why is not clear to me, but all I did was 
to use the method as documented rather than as copied from the OP's 
code. But perhaps you are seeing something else?

Anyway the OP seems to have found a satisfactory workaround.


Peter Jamieson

http://tips.pjmsn.me.uk

On 27/11/2009 13:40, Graham Mayor wrote:
> It should work if you multiplied the bookmark names of the cells, however
> then you need to have more control over your cell naming, as rows are being
> added - see the two examples at http://www.gmayor.com/word_vba_examples.htm
>
0
Peter
11/28/2009 9:46:20 AM
I should have explained myself better :(

What is missing is the updating of the field to reflect the added changes. 
This requires the field editing dialog to be accessed and executed, thus the 
relevant section should be

        With Selection.FormFields(1)
            .TextInput.EditType Type:=wdCalculationText, Format:="", _
                Enabled:=False
            .CalculateOnExit = True
            .TextInput.Default = sDefault
            'Add the following line to update the field
            Dialogs(wdDialogFormFieldOptions).Execute
        End With

This would be true even if the bookmark names were used - but the method is 
shown in the link to my web page I posted earlier.

However as you say it is now only academic as the OP has employed a 
workaround.

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Peter Jamieson wrote:
> FWIW I had exactly the same problem as the OP when I tried his code,
> but outside the context of a userform, on Word 2007 SP2 on Vista.
> The first thing I tried was to change the calculation from using cell
> addresses to formfield names, but it made no difference. What did
> makeit work was the change I mentioned earlier - that works here with
> either type of addressing. Precisely why is not clear to me, but all
> I did was to use the method as documented rather than as copied from
> the OP's code. But perhaps you are seeing something else?
>
> Anyway the OP seems to have found a satisfactory workaround.
>
>
> Peter Jamieson
>
> http://tips.pjmsn.me.uk
>
> On 27/11/2009 13:40, Graham Mayor wrote:
>> It should work if you multiplied the bookmark names of the cells,
>> however then you need to have more control over your cell naming, as
>> rows are being added - see the two examples at
>> http://www.gmayor.com/word_vba_examples.htm 


0
Graham
11/28/2009 10:37:44 AM
Reply:

Similar Artilces:

Specify position of forms in window?
How can I specify the position in which a form will always appear in the window, when opened? I have several small forms which need to be open and visible all at the same time and I would like to specify the position of each one in the window, so that they are in a logical position relative to each other. Hope somebody knows how! Many thanks CW In the form load event you can use the movesize to place the location of the form. Docmd.MoveSize 4000,4000 play the numbers until you find the desired location -- Good Luck BS"D "CW" wrote: > How can I specify the position...

Calculating Time difference based on a condition
I have 3 columns that have date/time on the first column and device status on the 2nd column and calculated Time difference on the third column. I have sample data below. I have to subtract the first instance of ENABLE DEVICE DATE/TIME from the previous MALF DEVICE DATE/TIME to get the difference. I do not worry about the DISABLE Device date/time at all. I could do this manually but there are about 20,000 records to go through. I don't know if there is a worksheet function that will do this automatically for me. Date/Time DEVICE STATUS TIME DIFFERENCE 6/7/04...

Add Problem Code to SmartList Field Service Calls
We would like to be able to access the field "Problem Code" to the SmartList Field Service Calls. It exists on the Service Call itself, and we like to you use this field as an analysys of particular Service Calls which we segment using the problem code. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then cl...

linking fields which may be incomplete
I have a table of 3,000 disciplinary cases from the past four years which my school has tracked. The identifier we used was a. student's name, and b. the last four digits of their SSN. I am now need to find their full SSN. We have a "warehouse" of master tables, which I can link to. Many of these tables contain the full SSNs of the students. The question is, is there anyway to link the fields together (one field including only the last four digits of the SSN, one field which is the whole SSN) in a way that I can find the full SSN of only the students in my ta...

Product Suggestion
We need to maintain Item Shipping Weights with a wider range of values for items than currently possible in GP. We sell both small items (resistors, fractions of a kg) and big ones (drums of cable). It is not currently possible to store both extremes because the field is currently an integer fixed at 2 decimals. It really needs to be a numeric field with greater precision and scale. This is particularly important in EU because of the introduction of WEEE directive on recycling waste, which has big implications in this area. ---------------- This post is a suggestion for Microsoft, and ...

FE
Hi I have a E2K3 sp2 BE & FE solution installed with SSL certificate, have enabled Form based authentication, but get basic logon box (still on internal network). After Logoff, logoff page looks "form based". Havn't seen any articles that decribe each entry on Default Web Site- Exchange/ExchWeb and so one. Do I have to do anything on BE server ? Any clue ? Jordan After you enabled FBA, did you restart IIS or the default web site? -- Jim McBee Blog - http://mostlyexchange.blogspot.com <Jordan> wrote in message news:52uhc29ik0r1hfc74fdqrkrhj26tv2thdm@4ax.com... &g...

Forms based and non-ISA 2004 soluitions
Currently I am publishing OWA Exchange 2003 via ISA 2004 forms based authentication. If I get rid of ISA 2004 servers and publish the Exchange 2003 OWA servers via F5 BigIPSwitches or or other load balance devices, how would the forms based authentication forms would be handled in this case ? I know the OWA front-end servers can provide forms-based authentication on their own, but I am not sure whether that would like as teh one in ISA 2004 or how functional they are if enabled on the Exchange 2003 side ? Gorms-based authenticaion provided by front-end servers is nearly identical to...

wont calculate
i have a spreadsheet that allows me to enter information and formulas but it will not calculate. Is there are setting that may need to be changed? Thanks for the help. HIt F9 to see it it calculates, if it does then go to: Tools>Options>Calculation tab see if the maunal option is selected and change it to automatic. If it doesn't you may wants to also make sure that your spreadsheet does not have any circular refrences. "john mcmichael" wrote: > i have a spreadsheet that allows me to enter information and formulas but it > will not calculate. Is there are...

Drop down menu macro in a web form table
How do I use Excel to create a drop down menu macro for use in a web form? Jonah ...

eConnect
What are the user defined fields for developers in the eConnect XML schemas used for? -- Cindy Cindy: Developers will typically populate these fields with data/values that they later use to populate their own custom tables (via a pre or post procedure). You would put a value say in the first user defined field and if the value is 1 then in a pre or post procedure they call their own custom stored procedure and if the value is 0 then they do not call their own customer stored procedure. That is probably the most common way people use these fields. Hope that helps some, JG "...

Clicking on Newly Opened Form
I am using Access 2007 to open another form and to assign a new value to control. So far, so good. I want Access to run the code on the newly changed control as if I clicked on it. I have tried a bunch of ways and nothing has worked. LA Lawyer wrote: >I am using Access 2007 to open another form and to assign a new value to >control. So far, so good. > >I want Access to run the code on the newly changed control as if I clicked >on it. I have tried a bunch of ways and nothing has worked. > Right after you set the control's value, call the con...

Excel not calculating anything
Hello, I just installed excel 2003 and when I type in a function (specifically, =CONCATENATE(A2," ",B2) ) It just adds that to the cell I'm wanting the results in. It does this with sums as well. I am very novice at excel, but I do know how do do the minor functions. Can anyone tell me if there is some option I have unclicked or clicked that won't let excel calculate anything? Thank you Hi It looks like you have the calculation set to manual {press F9 to calculate formulas manually, or check Automatic in radio button on Calculatin tab of Options window (Tools.Options ...

Opening a Form Erases Data from Table
Good Day!! I have a very wierd problem here. i have a form that is bound to a table with some bound textboxes, and some non-bound text boxes, etc... nothing out of the ordinary. but when i open the form, the bound boxes are blank, and it erases the data in those fields in that table! it only erases the bound data... what i am doing - fairly simple operation... i have a form that has a listbox of records supplied by the same table (i was thinking that might be the problem...). the user selects the item they want, and the clicks a button. then, using the unique key selected, it opens th...

Calculating rents and months past in 1 cell???
Hi, I´m making a Worksheet to calculate the Residual Value of car at the time the worksheet is open. So i have colums with the "inicial date of the contract", "Final date of the contract", "the monthly rent", and the "car value when purchased". With this colums i need to calculate the value of the car at today date. This columm as to do this: "Value of the car when Purchased" - (MINUS) "rents payed since the begining of the contract until todays date". How can i make excel calculate this. Sincerely To find out the num...

Can I display the actual data in the data field of a pivot chart?
Using Excel 2003, I am creating a pivot table using customer data similar to the following: Customer Location Interface Code 11 Word 123 12 Excel 13 Outlook 456 21 Word 22 Excel ABC 23 Outlook XYZ I am placing the Customer Location in the row area, the Interface in the column area and the Code in the data area. I would like the Code to show in the pivot table as the "123", "4...

Is there an ROI calculator for Microsoft Retail Management System.
Is there an ROI calculator for Microsoft Retail Management System? If so where can I download it? not sure if this is what you are looking for or not. www.gmroii.net "georgesg" <georgesg@discussions.microsoft.com> wrote in message news:EA22D802-0A5A-4D71-8608-DE0B9C17E636@microsoft.com... > Is there an ROI calculator for Microsoft Retail Management System? If so > where can I download it? ...

calculate hours over multiple days
How do I..... Date // time calculation I have something that starts on a certain date at a certain time --- and goes for several hours --sometimes over several days and has an end date and time which I can enter. I want to calculate how many total hours:minutes �(so hours will sometimes be in excess of 24) For example -- want to enter 9/28 8:30PM - 10/9 6:00AM and have it calculate the total hours & minutes from begining to end. (I want to be able to enter the date & time for beginning and end points and have the results as HH:MM) THANX!! "Larry Geyer" <larry...

Mapping two different fields
Is it possible to have one field from Leads mapped into two places in the account. For example can I map the address field from Leads to the main address field and billing address field in accounts? If so how do I do this? THanks? I believe the 'main address' field is already mapped between lead and Account but to add another mapping, go to: Settings, customizations, customize entities, lead, relationships, lead>account, add the field mapping here. "ltcv28@hotmail.com" wrote: > Is it possible to have one field from Leads mapped into two places in > the accoun...

Prerinted forms
I am currently using Excel in Office 2000. Is it possible to create a form on screen and designate the form labels as non-printing while the data cells would print? i.e this would be necessary to use an on-screen form with a preprinted form. I can hide the label cells but then they disappear from view, defeating the usefulness of the on-screen form. Would a later Excel version offer this capability? Hi Arthur by "on screen form" you do mean a user form (created in vba - insert userform) or a worksheet set up like a form - if you could set up a worksheet like the form you could...

How to get parentsubject from the Incident Entity Form?
Hi, Does any of you guys have an idea about how to get the subject.parentsubject field value from the Incident Entity Form?? Through there, we have access to the subject.subjectid, but I can't figure out how to get it's parent... Any HELP would be appreciated!! Thanks! By default, there's no way to get the fields of other entities then the one you're accessing the form of. So you can get the incident fields, but not the fields of a related subject. If you need to access those fields on the client side, you could do a client side webservice call to retrieve those valu...

form's keep moving down the screen when I tab through them
I have a couple forms in my db. When I'm on one form and then I click the next form, it starts .5 inch lower than max screen, if I keep doing this it keeps getting lower and lower, until I have to go into view and have to maximize it. What causes this? Ryan ...

Subform/Form Referencing
I have a Subform that resides on numerous Forms. I have a calculated field on the Subform that references a field on the Form. [Cost] - Forms.FormName.[Cost] As I place the same Subform on other Forms, the reference is now incorrect because the Form Name has changed. What coding would I use to replace Forms.FormName so the subform will reference the Current Form and display values correctly? Any help appreciated! Newer, Try... =[parent].[Form]![Cost] Tested OK for me, with a subform field that got it's vale from City on my main form. -- hth ...

Data stored in form
Hello, I am in the process of upsizing an Access 2000 database to SQL Server 2005. In the process, I have noticed that a form that is in use does not corespond with a table in the access database. It appears that all of the data is stored in the form itself. 1) Is this possible? 2) If it is, is there a way to transfer the structure to a table in this access database 3) If 2 is possible, can I move the data records over to said table? Thanks, Peter hi Peter, On 28.01.2010 18:51, Peter wrote: > In the process, I have noticed that a form that is in use does not coresp...

Sending emails form the defult account
hi all, I'm using outlook 2007 and I have 2 accounts, I want to make replies through the defult account, but when I reply to the undefult account email it will send the emails form it. How can I let it send all emails for the both accounts by the defult account only. Thanks all By default a reply is sent from the account it was received on, hence you have change the account used for sending, manually "Misho" <Misho@discussions.microsoft.com> wrote in message news:1FA24A55-D7EA-4DDA-8CF8-AF550F8E4660@microsoft.com... > hi all, > > I'...

Column headers in forms
Hi all: Is there a way to change the format of the forms in CRM to allow for a column header layout such as this: Order # Description 123 Test order 333 CRM order We need a way to change/modify the order form to allow for this type of layout... Thx Mike Navarro Do you mean for the order form or the view of orders? Either way, you should be able to accomplish what you need in settings->customization and then navigate to the order entity. Once open, you will see a navigation pane option for "Forms", click on that and then drill in to the form you wan...