Alpha Video Training
Results 1 to 8 of 8

Thread: Check to see if records in an embedded browse

  1. #1
    Member
    Real Name
    Ernie Storms
    Join Date
    Mar 2008
    Location
    Wimberley, Texas
    Posts
    566

    Default Check to see if records in an embedded browse

    Have an embedded browse on a form populated from a child table. Have a button to add multiple records to this child table if they haven't already been added. Have been unable to find a method or function to use to tell me if there are or are not records showing in the browse for the currently selected parent record.
    How can this be done? Thanks.
    Ernie

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Check to see if records in an embedded browse

    There will be child records for the current parent if you query for the current parent key field and the child table key field is not blank.


    a5_get_records_in_query()
    Last edited by Stan Mathews; 04-19-2008 at 07:52 PM.

  3. #3
    Member
    Real Name
    Ernie Storms
    Join Date
    Mar 2008
    Location
    Wimberley, Texas
    Posts
    566

    Default Re: Check to see if records in an embedded browse

    Stan,
    I had tried that, but haven't been able to get it to work consistently. Guess I'll just keep trying different things. Is this the only way to do it?
    Thanks for you help.
    Ernie

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

    Default Re: Check to see if records in an embedded browse

    Since each child table record in the browse must contain a link field that matches the related parent table record, I find the fastest way to see if the browse itself is empty is to check the link field value. If it's empty there is no linked child table record. If there are no linked child table records the browse is empty.

    Example attached. Unzip to empty folder. Study the Button on Form1.

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

    Default Re: Check to see if records in an embedded browse

    Same question was asked a while back.

    There was a zip file attached to my last post which I later deleted but basically it says:

    if child->linking_field=""
    ui_msg_box("Child Records", There are no child records")
    end if

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

    Default Re: Check to see if records in an embedded browse

    Thanks, G. I'd forgotten about the earlier thread, and that's pretty bad since I was the guy asking the same question !

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

    Default Re: Check to see if records in an embedded browse

    Tom:
    It happens.. at least you remember the good stuff, and that's what counts.

  8. #8
    Member
    Real Name
    Ernie Storms
    Join Date
    Mar 2008
    Location
    Wimberley, Texas
    Posts
    566

    Default Re: Check to see if records in an embedded browse

    Thanks, guys. I'll keep plugging away at it. Something else is going on that I need to figure out, whether a re-design or some code I've got in there. The embedded browse is not responding "correctly". Other records are showing up at times. If I hit the wall, I'll try to zip up an example for some help.
    Thanks again.
    Ernie

Similar Threads

  1. Check box in an embedded browse
    By rbierman@iowbar.org in forum Alpha Five Version 8
    Replies: 9
    Last Post: 06-29-2008, 07:12 PM
  2. Lifting records from a browse using check boxs
    By andycaps in forum Alpha Five Version 6
    Replies: 4
    Last Post: 10-20-2005, 10:13 AM
  3. Embedded browse records
    By Kay Aldridge in forum Alpha Five Version 5
    Replies: 3
    Last Post: 07-05-2004, 05:12 PM
  4. # of records in embedded browse
    By Mark Lucas in forum Alpha Five Version 5
    Replies: 2
    Last Post: 03-17-2004, 08:49 AM
  5. Embedded Browse Check Box
    By crimmelcp in forum Alpha Five Version 5
    Replies: 1
    Last Post: 10-15-2002, 07:36 PM

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
  •