Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing one form from another in VFP & populating the
Message
 
 
À
09/07/2005 14:21:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01030929
Message ID:
01030942
Vues:
15
You can pass the client id to the tasks form
do form_tasks WITH thisform.client.value
* Init form_tasks
LPARAMETERS tcClient
IF NOT EMPTY(tcClient)
  * Code here to select tasks for that client
ENDIF
>A bit of a long one here:
>
>I have a project with client information in one project. call this project_client. I also have a project that has the tasks to be completed for each client. call this project_tasks
>
>What I'm Looking to Do:
>I want to access one form in project_tasks from a form in project_client. When someone is looking up information on a client, I want them to be able to click on a command button and access a form that lists all of the tasks for that client. It should already have the tasks selected for that specific client. The tasks cannot simply be listed as a report since the tasks form has capacity to make changes to the tasks, which I need. Both projects work well on their own, but looking up client information in one form and then having to open another form and then search for the same client to look at their tasks gets tedious.
>
>Background on my forms:
>The form listing the tasks has a combo box on the top in which all the clients are listed. The form also has a large list box populated with the tasks to be completed. The combobox is populated by a requery select statement that selects information from the client table into a cursor, and the init of the combobox lists the rowsourcetype as 2 and the rowsource as the cursor name. Using the combobox, when you scroll to a different client, the combobox "interactivechange" issues the command to requery the large listbox.
>
>in the requery of the listbox, it selects data from the tasks table for the clientnumber in the combobox and puts it into a cursor. The init of the listbox sets the rowsourcetype to 2 and rowsource to the cursor name.
>
>My Problem:
>I cannot figure out how to get the commandbutton to access the form in project_tasks, change the value of the combobox to the value of the client_number in project_client, and then populate the large task listbox with the correct tasks for that client.
>
>What I've Tried:
>I have tried a number of different ways, such as:
>in the command button, issue the following:
>
>do form_tasks
>form_tasks.combobox.value = thisform.client.value
>
>i get function,name, etc. is invalid
>
>I've also simply fooled around with the code to see if i can get it to work around the error messages. nothing has worked.
>
>I know this is a long post, and i hope it is understandable. if you have suffered from reading through it :-) and still want to help, let me know any suggestions or questions that you have.
>
>Thanks in Advance,
>
>Paul
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform