need help w/list fields FPW2.6

need help w/list fields FPW2.6

Post by David Ingerso » Fri, 22 Nov 1996 04:00:00



In FPW 2.6, I'm unsure of how to do what seems to be a simple task...

I have database A and B linked by variable m.link...

In an entry screen for database A, I want a list box that shows all items
in database B that share the common, key variable m.link(which is
displayed on the entry screen).  From what I can tell, this is an array,
but I'm unsure of how to set the Array up in thet setup, and then make the
list field display it.  Also, in this 'box' that will list the related
items, I want to be able to double click on any of them so that an entry
screen opens from database B that will allow editing/deleting of that
item.

I'm relatively new at FoxPro, but this seems like a pretty important, yet
simple task.

Thanks for any help...

DI

--
----------------------------------------------
***********    David Ingersoll
* *** *** *    Full Time Technical Consultant
* * * * * *    
    * *        Temple University(038-15)
    * *        Computer Services
  *** ***      1805 N. Broad Street
  *******      Philadelphia, PA 19122-6094
----------------------------------------------
          phone: 215-204-5555

          www:   dave.temple.edu              
----------------------------------------------

 
 
 

need help w/list fields FPW2.6

Post by Pat E. Finucan » Fri, 22 Nov 1996 04:00:00


When the operator enters m.link data, the valid clause should call a
function.  The function could either SQL Select the data that is related to
m.link or do a seek and insert the data into an array/table while link =
m.link.  Re-display the data in the listbox.  An array is fine if the
number of links is relatively small, I'd use a cursor if the number of
links could be large (why waste memory).

If the return count is zero (in other words no links in B) then you should
either disable the listbox or provide an alternative way of data entering
data.

Then, in the valid clause of the list enter somethink like DO
LINK_TO_B.SPR.  This will call your screen for updating table B.



Quote:

> I have database A and B linked by variable m.link...

> In an entry screen for database A, I want a list box that shows all items
> in database B that share the common, key variable m.link(which is
> displayed on the entry screen).  From what I can tell, this is an array,
> but I'm unsure of how to set the Array up in thet setup, and then make
the
> list field display it.  Also, in this 'box' that will list the related
> items, I want to be able to double click on any of them so that an entry
> screen opens from database B that will allow editing/deleting of that
> item.


 
 
 

need help w/list fields FPW2.6

Post by David Griff » Fri, 22 Nov 1996 04:00:00


You should set up a master detail relation with a browse or grid on
the child table.  Now you can edit those displayed records or go and
add some new ones.

This leads to a problem I'm having in VFP where I have setup the
relationship but when I select the child table and issue a "go top" it
doesn't respect the relation that is setup in the parent area.  Anyone
know how it's done?

Right now I'm setting a filter when I go to edit the child area but I
don't know if that's correct.

David Griffis
TelePrompt Software Services

>In FPW 2.6, I'm unsure of how to do what seems to be a simple task...
>I have database A and B linked by variable m.link...
>In an entry screen for database A, I want a list box that shows all items
>in database B that share the common, key variable m.link(which is
>displayed on the entry screen).  From what I can tell, this is an array,
>but I'm unsure of how to set the Array up in thet setup, and then make the
>list field display it.  Also, in this 'box' that will list the related
>items, I want to be able to double click on any of them so that an entry
>screen opens from database B that will allow editing/deleting of that
>item.
>I'm relatively new at FoxPro, but this seems like a pretty important, yet
>simple task.
>Thanks for any help...
>DI
>--
>----------------------------------------------
>***********    David Ingersoll
>* *** *** *    Full Time Technical Consultant
>* * * * * *    
>    * *        Temple University(038-15)
>    * *        Computer Services
>  *** ***      1805 N. Broad Street
>  *******      Philadelphia, PA 19122-6094
>----------------------------------------------
>          phone: 215-204-5555

>          www:   dave.temple.edu              
>----------------------------------------------