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

UPDATE CHILD

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

    UPDATE CHILD

    I have had a quick look in the archive to see if there is a quick answer.

    I have a set, with a parent and one child. One a one to one link. I have allowed cascade. But when I enter a new record in the parent, I do not see a new child. What i am doing wrong.

    Rev peter Lear - feeling silly

    #2
    RE: UPDATE CHILD

    Peter:

    Are you working from the set or from the individual files.
    you must work wiht the set. usually a screen show the fileds for the parent and the child. you enter data into the parent and move the cursor to a child field. the move to the child field will create the parent record. enter data into the child's fields and save the record.

    bob

    Comment


      #3
      RE: UPDATE CHILD

      Thanks Bob

      So I really have to type in name and initials and all that twice?
      Isn't there some way of posting the data. I am too inexperienced to try on my own without a shove in one direction. Peter

      Comment


        #4
        RE: UPDATE CHILD

        If your form is based on the set, Alpha Five will enter the linking field values in the new child table record for you. You need merely enter something else into one of the other child table fields...

        In similar situations I often use a field rule in the child table to 'skip' the key field so the user cannot go back and edit a linking value after it's entered.

        -- tom

        Comment


          #5
          RE: UPDATE CHILD

          Thanks Tom

          I think I created the set AFTER I created the original entry form. I will re-create the main form in the set. The problem still arises that I will not always want to enter stuff into the the child when a new record is created. It may be at the second or third 'visit' that I shall need to do this.

          By then it is too late as the record will not have been created, or will an edit of existing record trigger the creation of the child?

          Peter

          Comment


            #6
            RE: UPDATE CHILD

            Hi Peter:

            Peter, to avoid junk in the child table and potential data entry problems in the set form, I would suggest that you design a small data entry form based on the child table. That form should NOT include the field that will link the parent and child.

            Open the set form in design mode and drag a sub-form object from the toolbar into the set form. Make this the approx. size of the form you designed for the child; choose "View a Child Table" and select the form you just created for the child. You won't see the form in design mode, just a box indicating its presence. Right click on that box, choose "Properties" and uncheck the tab stop box. This will stop the cursor from automatically going into the sub-form during data entry.

            Now, to enter a child record, you enter a value in the parent linking then click into the sub-form to enter a child record. You can do this either when a parent record is being entered or later, it makes no difference. The sub-form acts like any data entry form, if you realize that you don't want to add the child after all, hitting Escape will abort the entry and no child record will be created.

            Referential integrity applies to an existing parent-child relationship, it doesn't apply when entering a record. In your case, with ref. integ. set to cascade you could, later, change the value of the parent's linking key field and that change will "cascade" to the child, preserving the relationship between the two which would otherwise be broken. Likewise, if you delete the parent record, the child will also be deleted. This too can be problematic, if you have duplicate key values in the parent. Then, if you change the key value or delete one record you could have an unintended affect on another.

            I would pose the following questions for you to think about. Are you sure you really want a new child record entered EVERY time you create a parent record in your one to one set? If you really do, then it seems to me that you should at least consider the possibility that whatever fields you are putting in the child really belong in the parent table.

            Second, the value of the parent linking key can be problematic. If you are creating it "on the fly" make sure you have a field rule lookup defined to the child table so you can check if there is already a child record with that link ID. Then you can either create a different linking key in the parent or use the existing child record. Likewise you should probably enforce a field rule in the child that the linking ID field should have a unique value.

            Finian
            Finian

            Comment


              #7
              RE: UPDATE CHILD

              Thanks to Peter for asking and Finian for the reply. This answers the problem I've been having to convert an A4V6 set to A5V4.

              Paul

              Comment


                #8
                RE: UPDATE CHILD

                Finian

                Thank you for this very helpful explanation. The need for every record to have a child is dictated by the fact that I cannot have a memo field on the parent without getting problems. Advice on this forum was to create a child for the memo fields - these are file notes which could be 30 characters or several hundred. So they have to be memos.

                Regards - Peter

                Comment


                  #9
                  RE: UPDATE CHILD

                  I didn't connect one thread with the other ...

                  The only addendum to my advice would be that, if you haven't already, add an id field to the parent record (make it Character, 6) and use an update to autopopulate the field with values beginning at 000001. There is a pre-defined genie that will create this update operation for you.

                  Once each record has a unique ID, make the field autoincrement, and use it as the linking field to the memo table. This will eliminate at least one possible source of confusion between parent and child. Your sub-form can now be just one big memo field and you can be confident that each memo will link only to its correct parent.

                  Finian
                  Finian

                  Comment


                    #10
                    RE: UPDATE CHILD

                    Finian - Thanks - this is not the first time you have saved my bacon. Peter

                    Comment

                    Working...
                    X