Alpha Video Training
Results 1 to 17 of 17

Thread: Form and Browse toggle

  1. #1
    Member LeeG's Avatar
    Real Name
    Lee Goldsmith
    Join Date
    Jul 2000
    Location
    Acton, Maine
    Posts
    32

    Default Form and Browse toggle

    I hope this is simple. I am toggleing between a form and a browse for the same table. I am using action scripting to do this with a button on the form and doubleclick on the browse. Here is the problem, when I click my button on the form I go to the browse and the highlighed record is the current record in the form. But when I double click a record in the browse and would like to have that be the current record in the form, it is not. Can this be done using the toggle form/browse action script.

    Lee

  2. #2
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,952

    Default RE: Form and Browse toggle

    The simplest way to do this is to put the form in design mode, click on form at the top toolbar, then properties,. In properties, click on form, and note that there isa slot for a companion browse - select the browse you made. You might also do the same thing in the browse, for the companion form.

    When you push the F8 key from either the form or the browse, it will automatically toggle back and forth, and will toggle back to the form based on the record that has focus in the browse.

  3. #3
    Member LeeG's Avatar
    Real Name
    Lee Goldsmith
    Join Date
    Jul 2000
    Location
    Acton, Maine
    Posts
    32

    Default RE: Form and Browse toggle

    Martin that is what I am doing. When you go to the browse from the form it works, the current form record is in focus on the browse. Now if I select another record in the browse and press F8 it goes back to the form and always shows the number 1 record.

    What am I doing wrong or what do I need to check to make this work.

    Lee

  4. #4
    VAR
    Real Name
    John Lemisch
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    673

    Default RE: Form and Browse toggle

    you are creating a filtered index on the form from the first record at which you are looking. on the form, events, "onexit" create "set record number order"

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Form and Browse toggle

    Lee,

    Is it possible? Yes.

    If you open the default form for the Customer table in Alphasports you can move to a record, toggle the default browse with F8, move to a different record, toggle back to the default form with F8 and the "different" record is still in focus. I think your onRowDblClk event script is misbehaving.

    -- tom

  6. #6
    Member LeeG's Avatar
    Real Name
    Lee Goldsmith
    Join Date
    Jul 2000
    Location
    Acton, Maine
    Posts
    32

    Default RE: Form and Browse toggle

    People I am not getting this to work. Even if I just use F8 and go to the browse it works, the current record is the active record in the browse, but if I make another record the active record and then press F8 I go back to the form and record with recnumber 1 is the record in focus.

    WHY

    Lee

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Form and Browse toggle

    Is this behavior you're seeing while using the default form and browse for the Customer table in AlphaSports or are you talking about your own table?

    -- tom

  8. #8
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default RE: Form and Browse toggle

    Lee:
    ""but if I make another record the active record and then press F8 I go back to the form and record with recnumber 1 is the record in focus.
    WHY ""

    You ask WHY and the answer is very simple:
    when you go back from the browse to the form, you areall you do is put the form back in focus, but you did not do anything else or issue any other command to make the form display that specific record you double-clicked on from the browse.

    What you need to do is use "zoom to record", that will show the form (if you designate that form as the form to zoom to) displaying the record you double-clicked from the browse.

    You could zoom using the icon on the toolbar, xbasic or Action Script.
    Gabe

  9. #9
    Member LeeG's Avatar
    Real Name
    Lee Goldsmith
    Join Date
    Jul 2000
    Location
    Acton, Maine
    Posts
    32

    Default RE: Form and Browse toggle

    Everyone who has responded THANK YOU VERY MUCH.

    But nothing has worked. I believe the documentation describes the toggle feature and for me it works in one direction, form to browse, but not in the other direction, browse to form. Any other script function does not work either. Unless someone can help me I will most likely have to live with it.

    By the way I am using my own tables for this, not ones that came with the software. Also remember I am toggleing between a form and browse on the same table. I have the form in the browse property and the browse in the form property.

    Thanks again all

    Lee

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Form and Browse toggle

    Lee,

    Something else is going on in your custom form or browse.

    Unzip the attachment to an empty folder.
    Open the database.
    Open the form.
    Choose a record.
    Press F8 to toggle to the companion browse.
    Choose a different record.
    Press F8 to toggle back to the form.

    Works fine here.

    Suggest you zip your database and post it here with instructions for us to follow, keystroke by mouse click, so that we can see the problem.

    -- tom

  11. #11
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,952

    Default RE: Form and Browse toggle

    to add to Tom's message, "something else is going on," right click on the table (or set) from the controlpanel, and select "open default form."

    edit the form, and put your browse as the companion browse, and save the form as maybe "test"

    edit the browse and make the new form ("test") the companion form.

    now try the F8 key and see if it works.

    if it does - then examine your form - look in the oninit and onactivate events for code. - look in the filter/order properties of the form and see if there is anything there - especially in the filter.

  12. #12
    Member LeeG's Avatar
    Real Name
    Lee Goldsmith
    Join Date
    Jul 2000
    Location
    Acton, Maine
    Posts
    32

    Default RE: Form and Browse toggle

    Hi Tom

    Unzip my file and open Company Form then F8 to browse, works fine, then change record and then press F8 and go back to form, always goes back to the same record.

  13. #13
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Form and Browse toggle

    Lee,

    I've run out of time and can only give you a clue on why your browse is behaving as you see.

    Your custom form and custom browse layouts are based on a complex set containing several instances of the same child table.

    Ordinarily, the default browse for a set will contain a single row for each composite record. (check user guide for definition and example of "composite record", it's in the section on designing reports for one to many sets)

    In your custom browse you're only displaying three rows. The other composite records are missing.

    Compare the behavior of the default form toggling to the default browse for your set. You can get to the default form by right clicking on the set name in the control panel. Choose default form, choose a company name, then use F8 to toggle to the default browse. NOtice now that there are additional rows displayed, one for each "composit record". Move your record selector to a row containing a different company name, and hit F8 again. You'll be toggled back to the default form correctly.

    This leads me to think there's something wrong in your custom browse layout, but I haven't had a chance to figure out what. Maybe these clues will help someone else figure it out for us both.

    -- tom

  14. #14
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Form and Browse toggle

    Lee,

    To put the matter succinctly, I think F8 is trying to toggle back and forth between identical composite records. i.e. the same combination of parent and child records as are currently selected when F8 is pressed in your form. Your custom browse does not show the composite records, so F8 fails when toggling back to your custom form.

    -- tom

  15. #15
    Member LeeG's Avatar
    Real Name
    Lee Goldsmith
    Join Date
    Jul 2000
    Location
    Acton, Maine
    Posts
    32

    Default RE: Form and Browse toggle

    Tom

    Thanks very much for your time. Please don't lose any sleep over this. I think I will use the embedded browse on the form that I sent instead of the toggle, and this will do what I want.

    Thanks again

    Lee

  16. #16
    Member
    Real Name
    John T Mattison Jr
    Join Date
    Oct 2004
    Location
    Toccoa GA (North East corner)
    Posts
    39

    Default Re: Form and Browse toggle

    Quote Originally Posted by Tom Cone Jr View Post
    Lee,

    Is it possible? Yes.

    If you open the default form for the Customer table in Alphasports you can move to a record, toggle the default browse with F8, move to a different record, toggle back to the default form with F8 and the "different" record is still in focus. I think your onRowDblClk event script is misbehaving.

    -- tom
    Tom

    I'm sorry but that is not the way my copy of AlphaSports works for me. (My app forms and browses also). If I go to the "Customer" form in AlphaSports and press f8, I go to the same record in the Browse. If I press f8 to return to the "Form View" I return to the first record, particularly if I select another in the Browse. (This feature is particularly useful in editing a mailing list after receiving the US Post Office returns after a mailing.)

    In AlphaSports, there is no "Companion Browse" or "Companion Form" indicated in the properties for either view in my version, I am running A5V7.

    I have used titles for the Form and Browse in my app but still get the same results as AlphaSports.

    Any Ideas??

    Thanks in advance.

    John

  17. #17
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: Form and Browse toggle

    John,

    What do you want to happen when you use the F8 key to toggle between the form/browse? I use the OnKey form event to control what the F8 key does. In this particular instance, we are loading the companion browse based on the forms current filter. When pressing the F8 from the browse, we return to the same location on the form where we were when we first pressed the F8 to go to the browse.
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

Similar Threads

  1. F8 Companion Browse Toggle Error
    By Lynda Huddleston in forum Alpha Five Version 5
    Replies: 1
    Last Post: 03-28-2005, 06:30 AM
  2. Toggle form / browse
    By Bill Parker in forum Alpha Five Version 5
    Replies: 2
    Last Post: 09-03-2004, 07:35 AM
  3. Toggle form / browse view
    By Bill Parker in forum Code Archive
    Replies: 0
    Last Post: 09-03-2004, 07:34 AM
  4. Form & Browse Toggle with Correct Record
    By debwelch in forum Alpha Five Version 5
    Replies: 5
    Last Post: 03-16-2004, 10:44 AM
  5. How to toggle browse/view as A4
    By Steve Pick in forum Alpha Five Version 5
    Replies: 7
    Last Post: 12-30-2002, 04:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •