Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10

    Post Unanswered: FoxPro - passing parameters between forms

    I am new to FoxPro and I have written processes etc in the past, but never designed forms...

    Currently I have a form that contains two tabs, the first is "Maternity Details" which includes a list box with an employees maternity details. When you select an item in the lsit and enter tab two, it then shows the breakdown of the selected maternity period - Start date, end date, week due, actual DOB, etc.

    Now, due to a change in the way maternity leave works, we have to include information about KIT (Keep In Touch) days. This information is stored in a new table called "KIT".
    KIT(UniqueID, ParentID, DateFrom, DateTo)
    Where ParentID is the link between maternity and KIT.

    So I have the challenge of creating a form to contain KIT days for a selected maternity period. After much playing around I have come to the conclusion that a new form is probably the best way forward (not a new tab).

    I want to open the KITDays form to show only the records relating to the Maternity (by passing the ParentID to the form?).

    Feel free to ask for any more information if needed. Ta!
    George
    Home | Blog

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Oh my... This raises more questions than I can easily enumerate in the time that I've got available at the moment, but I'll take a stab at them anyhow...

    First, does your maternity policy tie KIT days to the parent or to the Maternity event? Using the ParentID would tie them to the parent, and that doesn't seem right to me.

    Second, your existing UI seems to be based on tabs. You could certainly change to use a new form, but logically a new tab makes more sense to me. Can you explain why you chose to use a new form?

    I'm sure that I'll have more questions, but I need at least this much in order to get the "mental traction" needed to figure out where you are now, and where you are headed.

    -PatP

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I simplified my problem a wee bit so I apologise for the confusion.
    the relationships are as follows:
    One Employee can have many Maternity records
    One Meternity record can have many KIT records

    Employee.Unique_Identifier = Maternity.Parent_Identifier
    Maternity.Unique_Identifier = KIT.Parent_Identifier
    (The keys are automatically generated when the tables are created so no, they're not perfect, but they work).

    ---

    Yes, the existing UI is based on tabs, but the meternity forms first tab contains a list box with all the maternity instances, and the KIT will need this too. I didn't want to have a Listbox > select item > another lsitbox > select another item on the same form, but yes, it could be done this way.

    Currently I am struggling with the 3 tier relationships on one form, hence my idea to create a new form with only a 2 tier relationship.

    Apolgoies for my... *scribbles out poor (backspace?)* Sub-par answers but my head has been aching an aweful lot over this problem as of late.

    Thanks for the reply Pat <3
    George
    Home | Blog

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Just giving this a bump because this is fairly urgent (sorry!)

    Progress:
    Little to none
    George
    Home | Blog

Posting Permissions

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