[AccessD] Access 2010 Switch from Form View to Datasheet View crashes.

Bill Benson bensonforums at gmail.com
Sat Apr 29 23:59:16 CDT 2017


Perhaps if you can make that form a subform inside another form, you can
control its view through command button or a toggle button

'Air Code
Private Sub CmdToggleView_Click()
With CmdToggleView
     If .Caption = "Form View" then
          DoCmd.Runcommand(acCmdFormView)
        Txt1.Controlsource = "=Nz([cboPendingOrders].[column](3),"")"
        .Caption = "DataSheet View"
    Else
       DoCmd.RunCommand(*acCmdDatasheetView)*
       Txt1 = cboPendingOrders.List(cboPendingOrders.ListIndex),3,"")
 'check syntax, probably I have t wrong
       .Caption = "Form View"
     End If
End With
End Sub

On Sun, Apr 30, 2017 at 12:00 AM, David Emerson <newsgrps at dalyn.co.nz>
wrote:

> Hi Team,
>
>
>
> I have found the problem (but not a solution).
>
>
>
> It relates to a text box I have in the Form Header.  I have a combobox in
> the form header and the text box has the following control source:
>
>
>
> =Nz([cboPendingOrders].[column](3),"")
>
>
>
> If I remove the control source then the form doesn't crash.
>
>
>
> In Form View the data from column 3 shows correctly.
>
>
>
> I solved it by removing the textbox and showing the data in the Combobox
> concatenated with the original data from the combobox.
>
>
>
> Regards
>
> David Emerson
> Dalyn Software Ltd
> Wellington, New Zealand
>
>
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list