I know this has to be very simple, however, I can't figure it out. I need a command button that changes my form view from single form to continuous form. I know how to change a subform view to datasheet, but I can't figure this one out. Help please.
Hold on! I didn't say it couldn't be done!
[ol][li]Is it your intent to [blue]change the view of a subform or mainform?[/blue][/li]
[li]The code I intend depends on the data type of the primarykey. Is it text or numeric?[/li]
[li]Do you want a button that toggles the view . . . what?[/li][/ol]
Forget the making another form, stick with the chage between form and datasheetview.
design the form for a single form view and have a button to change the view to datasheet. use the doubleclick event on one of the fields to change it back to form view
I use
Public Sub ShowFormView()
DoCmd.DoMenuItem acFormBar, 2, 1, , acMenuVer20
End Sub
Public Sub ShowDataSheetView()
DoCmd.DoMenuItem acFormBar, 2, 2, , acMenuVer20
End Sub
and there will be another VBA command to do this too.
If you want a prettier datasheetview change it in the tools/options menu.
Ian Mayor (UK) Program Error
Always make your words sweet and nice. Because you never know when you may have to eat them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.