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

David Emerson newsgrps at dalyn.co.nz
Sun Apr 30 14:31:23 CDT 2017


Thanks Bill,

The client is used to using the native toolbars and combining the data so
that it shows in the Combobox is enough to cover their needs.

Regards

David

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Bill Benson
Sent: Sunday, 30 April 2017 5:00 p.m.
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Access 2010 Switch from Form View to Datasheet View
crashes.

The command button goes on the parent form.

On Sun, Apr 30, 2017 at 12:59 AM, Bill Benson <bensonforums at gmail.com>
wrote:

> 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
>>
>
>
--
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