If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Other PC Databases > FoxPro - passing parameters between forms

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-26-07, 07:30
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Post 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
Twitter | Blog
Reply With Quote
  #2 (permalink)  
Old 03-26-07, 09:45
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,612
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
Reply With Quote
  #3 (permalink)  
Old 03-26-07, 09:56
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
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
Twitter | Blog
Reply With Quote
  #4 (permalink)  
Old 03-27-07, 10:31
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Just giving this a bump because this is fairly urgent (sorry!)

Progress:
Little to none
__________________
George
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On