Change subform view from continuous to single in code 
Author Message
 Change subform view from continuous to single in code

The solution is to use two sub forms, layered on top of one another and to
display the single form when requested by the click of the edit button.
--
Steve Arbaugh
ATTAC Consulting Group
http://www.*-*-*.com/


Quote:

> Presently, I have a subform on a tabbed control.  When the
> form/subform are open, the subform is in continuous for "read only"
> purposes. The user can click a cmdEdit button on any given record to
> change that record's data. What I'd like to be able to do is:

> 1. Change the subform from continous to single for that specific
> record within the tab control construct (to avoid all other records
> becoming edittable).

> 2. Allow edit capability and cycle current record (I can deal
> properties of each control on the subform for locked, etc.).

> 3. Detect when user leaves the subform by anything other than clicking
> the appropriate command button (subform's lost focus event??).

> 4. Return to continuous for the subform when finished (determined by
> command button or lost focus).

> Thanks again!!

> Al U.



Sun, 06 Oct 2002 03:00:00 GMT  
 Change subform view from continuous to single in code
Put this code in a command button named cmdToggleSubform:

Private Sub cmdToggleSubform_Click()
    Me.NameOfSubform.SetFocus
    DoCmd.RunCommand acCmdSubformDatasheet
End Sub

This won't change to design mode, but it will toggle the view of the subform
between single form and datasheet.
---
Arvin Meyer

Quote:

>Thanks - I was almost afraid you were going to say that.

>There's no way to change the subform into design mode, set the subform
>as single, then return to continuous??

>Thanks again!


>>The solution is to use two sub forms, layered on top of one another and to
>>display the single form when requested by the click of the edit button.



Sun, 06 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB code to change continuous subform to single form

2. Change one unbound field on a continuous form view subform and they all change

3. Continuous Subforms and changing single record

4. linking Main form in single form view to subform in datasheet view

5. Open a form in either continuous or single record view

6. Click on record in continuous form to go to same record in single form view

7. Making Continuous & Single Subform visible

8. Changing from Single Form to Continuous Forms

9. Need Code To View Subform In Datasheet View

10. Form with subform can't default view continuous


 
Powered by phpBB® Forum Software © phpBB Group