Alpha Video Training
Results 1 to 3 of 3

Thread: Update only selected child record

  1. #1
    Anthony Holland

    Default Update only selected child record

    Hello All,

    I am an old Alpha4V6 user and am new to Alpha5. I have downloaded V4.5 Trial to check out and show my boss how much better it is that Access.

    I have a simple one to get me started on the new addressing.

    I have a form from a set with PO_HEAD and browse table with PO_ITEMS. I can enter PO's fine. When items start coming in I want a user to:

    1. Find the PO for the items that came in
    2. Highlight the item that came in
    3. Press a button to receive that item
    4. A box appear asking for the qty received
    5. (I will add the code to check that this qty is not
    greater than the qty ordered)
    6. If qty received input is valid store this value in child table PO_ITEM.QTY_RECEIVED.
    7. This way I can keep track of how many items are on backorded.
    8. I have messed around and keep getting error messages setting the parent and child field pointer.

    This was easy to do in A4V6 just being on the child record you want by looking at the region (even showing a seperate menubar while in the region) and pressing a hot key for the item.

    I just need a jump start on the conversion from a region to the embedded browse tables. I have done alot of VB stuff and am familier with dot notations.

    By the way, it looks like A5 is going to be awesome. I am very pleased that Alpha continues to make an excellent product and has continued this message board. I was shocked to see that they have A4V7 now.


  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000

    Default RE: Update only selected child record


    It may help to think of your form has having two layers.

    The subsurface layer is the set of tables upon which the form is based. Using Xbasic you can write changes directly to the tables in a set, but you have to put the table in change or enter mode first. To do this one usually gets a pointer to the table, and then uses tbl.begin_enter() or tbl.begin_change(). The xbasic reference manual explains how this works. There are specific techniques that must be used to get a pointer to the parent table, and then to get a pointer to a child table. After updating the underyling table it's often necessary to repaint the form because the objects displaying the fields in your set may not automatically refresh themselves. form_object_name.refresh() or form_name.resynch() are often used to do this.

    An alternative is to write changes to the form objects on screen. this is often done by using a different syntax:

    form_object_name.text = "new value" or
    form_object_name.value = 1234.68

    This is discussed in the xbasic reference manual also. The object addressing scheme is faintly reminescent of the tree structure of a hard drive:

    If you have an object called "Lname" on a form called "Customers", you'd change it's value like this:

    :Customers:Lname.value = "New Name"

    Notice there are two colons.

    If you have an object called "ItemNo" in a child table that's displayed in a browse called "Browse1" on the "PO" form, you'd change it this way:

    :PO:Browse1:ItemNo.value = New_Value

    Notice that now there are 3 colons.

    This is discussed in the chapter on object addressing in the xbasic reference manual.

    -- tom

  3. #3
    Anthony Holland

    Default RE: Update only selected child record

    Thanks, Tom.

Similar Threads

  1. Printing Selected Child Records
    By David Boomer in forum Alpha Five Version 6
    Replies: 10
    Last Post: 04-25-2005, 05:55 AM
  2. Update - uses all recs not selected
    By dik_coleman in forum Alpha Five Version 6
    Replies: 2
    Last Post: 03-13-2005, 08:40 AM
  3. Print Current Record Problem with Child Record
    By debwelch in forum Alpha Five Version 5
    Replies: 26
    Last Post: 09-27-2003, 08:11 AM
  4. Update Record Operation - child table field
    By C Croscutt in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-04-2003, 04:42 AM
  5. Displaying a selected record
    By GregOnline in forum Alpha Five Version 4
    Replies: 2
    Last Post: 07-12-2002, 01:34 PM


Posting Permissions

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