Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Subform trouble

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Subform trouble

    I use a button to "open" a subform from a main form, and
    this works well. I use another button on the subform to "close" the subform and return to the main form, and this also works well.

    The problem crops up when I make use of a dropdown list,
    suddenly the subform button and somtimes other subform fields will display. If I minimize the main form, then
    restore, the entire subform appears, but is not activated,
    and does not have focus.

    What gives with this stuff? Is this version just a piece of junk?

    Help

    #2
    RE: Subform trouble

    Barry,

    A subform is a form that is placed on the parent form. It sounds like you are leaving form1 and going to form2.

    Which version do you have?

    On which form is the dropdown list?

    Can you give us the sequence of events you go through prior to clicking the drop down list?

    Do you have other forms where this occurs?

    We need more info.

    kenn
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

    Comment


      #3
      RE: Subform trouble

      Ken,
      Thanks for your reply.

      I have Version 4.5
      Form 2 is a subform that is placed on the parent Form 1. The drop-down-list is on the parent Form 1. This list contains one field from another table. When a value is selected from this list, several fields on Form 1 are populated via a Table Lookup defined in Field Rules. Now I find that when ever I access any field on the parent, (after
      accessing and "closing" the subform), fields from the subform overwrite the parent screen.

      Well, I just fixed the problem. I was looking at the form(s) in design view while gaining information for this reply,
      and decided to remove the subform definition on the parent,
      and then re-establish it. After testing I find that my
      problems have disappeared. Just a quirk, I guess ???

      Again, thanks very much for your reply.

      Comment


        #4
        RE: Subform trouble

        Glad you found the problem. Welcome to the club. Been down this road a few times myself; finding the answer while trying to explain what's going on.

        kenn
        TYVM :) kenn

        Knowing what you can achieve will not become reality until you imagine and explore.

        Comment


          #5
          RE again: Subform trouble

          Ken,
          I only thought my problem was fixed. Here is what I have
          found: When I use .hide() to "close" my subform, record
          pointers work good, that is I can (with the subform open)
          travel through the records (VCR controls), and see that
          each form, parent and sub are pointing at the same record.
          Additionally, whenever I activate or show the subform, it
          is always pointing at the same record as the parent, and this is exactly what I want.

          However I have the afore mentioned problem (where with the
          subform only hidden and not closed), it's (subform) fields
          super impose on the parent when I travel from field to field
          on the parent. Originally I thought it was just the drop-down list that caused this problem, but now I know that accessing any field on the parent will cause garbage from
          the sub.

          Now, when I use .close on the subform, I have no subform garbage on the parent, however record pointers are now out
          to lunch. I suppose I could use close, and add code to point the subform at the same record as the parent, but trying to avoid code as much as possible.

          I do not find much in the manuals on this subject, can you
          help?

          Thanks

          Comment


            #6
            RE: RE again: Subform trouble

            You'll probably need to zip up a copy of the database and attach it here, Barry, before the gurus can offer much help. I'm not one, but I'd be willing to take a stab at it.

            One thought I had was that if the subform was overlaying fields on the main form, is the z-order of the fields in relation to the subform correct?

            Tom Lyon

            Comment


              #7
              RE: RE again: Subform trouble

              Thanks Tom,
              Attached zipped db will demonstrate that I am trying to
              incorporate a popup subform.

              You will note that the subform record pointer is not in sync with the parent form. This can be fixed by changing
              the code for the subform CLOSE BUTTON to .hide() the form
              instead of .close() ... ing it. However this brings back
              the problem of subform junk superimposing the parent form.

              Comment


                #8
                RE: RE again: Subform trouble

                Barry,

                I think I see your problem. You are mixing apples & oranges. On your entry form, you have placed a subform on top of your other fields on your ENTRY form. Not good. Your "Open Subform" button, open a new window with the "subform" being called as a form. The actual subform on your Entry Form is different than the one you open as a regular form with your button.

                Try the attached modified app. I placed your subform on a conditional object, got rid of the button and replaced it with a checkbox based upon a logical variable called vCond1. The variables OnChange event's script is simply: Cond1.refresh(). When you check the box, your subform displays and should be properly synched with your records.

                See if this does what you want.

                Peter
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #9
                  RE: RE again: Subform trouble

                  Peter,
                  Thank you very much for your assistance, this message board is great. Wish I could say the same about Alpha 5, but
                  it seems to be a very strange animal to me, after using MS-Access.

                  Why is it not good to place a subform over parent form fields? Can be done in Access easily, seems access is
                  smart enough to now that the subform will popup over other information, then go away, preserving the other information.
                  And it seems to work now in Alpha 5, after you made modifications.

                  How did you create the checkbox? When I try to create one
                  the interface wants me to use a table field. How did you
                  get it to use a non-table variable?

                  Finally, how is the ENTRYSUB subform different than the subform object on the MAIN form? This is where Alpha 5 is
                  really wacko (to me) when I try to use their parent-subform
                  syntax, I get complaints (error messages. This stuff is not intuitive at all. When I tried to setup the subform originally, I could not even edit it, it was too full from
                  table fields. Excuse me for having a large table. Had to
                  create the form outside of the main form, then do the subform thing within the mainform and tell it to use an existing form, ... just trying to describe this makes me
                  nauseous. To me, it looks as though Alpha 5 has some serious shortcomings where workarounds will suffice, if
                  you know how.

                  Comment


                    #10
                    RE: RE again,again: Subform trouble

                    Peter,
                    I just found out how you added the variable for the checkbox. But still curious on the "not good to place
                    subform over parent form fields".
                    Again, thank you very much for your help.

                    Comment


                      #11
                      RE: RE again,again: Subform trouble

                      Part of the confusion lies in the fact that Alpha Five may address forms differently than Access. In A5, a subform is an object, just like a field, that is placed on a form. That subform then is addressable, just like a field is, in various ways. It also retains many, though not all, of the properties of the form from which it was created.

                      A Popup form, on the other hand, is another beast. That is a form which, when opened, behanves more like a dialog box. It's properties and attributes are also addressible, but it is truly a 'form' entity and not a 'subform'. The confusion of your database resulted from the fact that you had a subform named entrysub *and* a button which opened up another form, also called entrysub. Those they are identical in structure and appearance, A5 treats them as two entriely separate entities with regard to linking and such.

                      Hope this helps clear the air a bit.

                      Tom Lyon

                      Comment


                        #12
                        RE: RE again: Subform trouble

                        Barry,
                        Your first method would work as follows:

                        1)Hide the subform, show all the other fields.
                        2)Hide the other fields and show the subform.

                        But, you would have to code that with xbasic. Using a conditional object saves you the hassle. If you use a Tabbed Object instead of a conditional object - you don't need any code or variable at all. Place your other fields on one tab and your subform on a second tab.

                        Regarding your misc. comments about Alpha not being intuitive, I would disagree. I think it is pretty intuitive. I'm sure if I started using Access I would find it counter-intuitive after working with Alpha so long. Everything has a learning curve. Stick with it and use this board and you may find you like Alpha quite a bit.

                        Regards,
                        Peter
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment


                          #13
                          RE: RE again,again: Subform trouble

                          See my message to you above.
                          Peter
                          AlphaBase Solutions, LLC

                          [email protected]
                          https://www.alphabasesolutions.com


                          Comment


                            #14
                            RE: RE again: Subform trouble

                            Sorry to belabor the issue, but I find the documentation
                            to be very poor, one half page (help and the manual) about
                            inserting subforms, that tells me essentially nothing.

                            Now I am digging into your method using conditional objects
                            etc, and finding a little more documentation on that subject. Hopefully I can find enough to learn how to do what you did, because just looking at the form and the conditional object, and the properties, and the actions is not enough, ie; not intuitive. As it stands right now, I do not have a clue as to how you setup the subform, with the conditional object and how they relate.

                            Thanks to all.

                            Comment


                              #15
                              RE: RE again: Subform trouble

                              I was able to successfully duplicate your fix to my problem,
                              conditional object, subform, and checkbox object. The
                              documentation for conditional objects was very helpful.

                              Again thanks to you and to all that responded to this
                              lenghty dialog.

                              Comment

                              Working...
                              X