[comp.sys.mac.apps] 4th Dimension: go back to right page

aqhx@vax5.cit.cornell.edu (06/14/91)

I have a question in 4th Dimension that I hope someone can help me.

I have a database with an Input layout and an Output alyout.  There are 4 
pages in the Input layout.  In the first page, there is Choice field 
where I will input 0, 1, or 2.  If Choice=0, then I will be switched to 
page 2.  If Choice=1, then I will be switched to page 3, and so on.  Now 
when I am in the Output layout (in User mode, not Runtime mode) and 
select a record and choose Modify from the menu, I want my program to 
bring me back to the right page of the Input layout, i.e. if I select a 
record with Choice=1, I want to go back to page 3.  How can I do that?

Your help would be much appreciated.

Tim
dhlx@crnlvax5.cit.cornell.edu

P.S.  Is there other way of designing (or redesigning) my database so 
that I can go back to the right page.

I know that I can add buttons (with script) to take me back to the right 
page in the Runtime mode.  But making my database into Runtime mode will 
be my last resort.

pejacoby@mmm.serc.3m.com (Paul E. Jacoby) (06/18/91)

In article <1991Jun14.125544.5494@vax5.cit.cornell.edu> aqhx@vax5.cit.cornell.edu writes:
>I have a database with an Input layout and an Output alyout.  There are 4 
>pages in the Input layout.  In the first page, there is Choice field 
>where I will input 0, 1, or 2.  If Choice=0, then I will be switched to 
>page 2.  If Choice=1, then I will be switched to page 3, and so on.  Now 
>when I am in the Output layout (in User mode, not Runtime mode) and 
>select a record and choose Modify from the menu, I want my program to 
>bring me back to the right page of the Input layout, i.e. if I select a 
>record with Choice=1, I want to go back to page 3.  How can I do that?
>
>I know that I can add buttons (with script) to take me back to the right 
>page in the Runtime mode.  But making my database into Runtime mode will 
>be my last resort.

Tim,
  At first blush, it seems like you could add either a Layout procedure
  or a Before phase in a button (the latter is preferred) which would
  execute the following:

      GOTO PAGE (2 - Choice)

  If you put this in a button, be sure the "Only when modified" button
  is UNchecked.  I haven't done any multi-page layouts, but this seems
  like the right idea--move to the appropriate page in the Before phase
  for that layout. Since Choice is global, as long as you don't change
  it in the Input processing, you are in business.
-- 
| Paul E. Jacoby, 3M Company, 3M Center, 235-3F-27                   |
| Maplewood, MN   55144-1000     .-----------------------------------|
| => pejacoby@3m.com             |     I'm afraid this is getting    |
|                 (612) 737-3211 |            too silly!             |