Switch form view (continuous-single) via code (2003/2007)

D

Dale Fye

I have a form that I'm using to review and add comments about a particular
item on another form. The use clicks "Comment" on the main form, and
frm_Comment pops up in a continuous mode so the user can review the comments
that are already there (with AllowAdditions set to No).

What I want to do is allow my users to click an Add button, which will
change the view to single form view while retaining the current filter, and
then go to a new record on that form. Then, when they hit the Cancel or Save
buttons, I want it to revert to a continuous form.

I know I could do this by just creating a data entry form, to go with the
review form, but wanted to see if I could streamline it a little.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
D

Dirk Goldgar

Dale Fye said:
I have a form that I'm using to review and add comments about a particular
item on another form. The use clicks "Comment" on the main form, and
frm_Comment pops up in a continuous mode so the user can review the
comments
that are already there (with AllowAdditions set to No).

What I want to do is allow my users to click an Add button, which will
change the view to single form view while retaining the current filter,
and
then go to a new record on that form. Then, when they hit the Cancel or
Save
buttons, I want it to revert to a continuous form.

I know I could do this by just creating a data entry form, to go with the
review form, but wanted to see if I could streamline it a little.


You can switch between form view and datasheet view, but so far as I'm
aware, you can't switch the same form between continuous forms view and
single form view. Even if you could, it wouldn't do you much good, because
the layout of your continuous form would likely be much different from the
layout of your single form.

How about this: use a main form with two subforms, one subform in
continuous forms view, and one subform in single form view set for Data
Entry. Put each of the two subforms on a separate page of a tab control,
and have the tab control's Style set to "None" -- no tabs or buttons, so the
pages can be changed only by your code. Each subform would be set up with
Link Master/Child fields that ensure that the right set of records are
selected and the right key foreign key is inserted.

Your Add button (on the main form) would switch pages to the one with the
data entry subform, and the Cancel & Save buttons would switch back to the
tab page with the continuous form.

So it would *look* like one form changing from continuous to single view and
back, but actually you'd just be switching tab pages.
 
D

Dale Fye

Dirk,

Great idea. This is actually part of a "wizard" I'm building, that employs
that technique when the user hits the "Back" and "Next" buttons. This
particular segment of the application, because it is displaying a lot of
information, pops up a separate form, but that process would work great here
as well.

Thanks for pointing me in the right direction.

Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top