Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass grid parameter to another form's grid ?
Message
From
26/12/2000 08:19:31
 
 
To
26/12/2000 00:04:56
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00456745
Message ID:
00456795
Views:
19
Hi, Chang.

You can have a command button to call your Invoice Picker form from the main one.

This second form have to be made modal (WindowType = 1), and you have to return the selected value (the invoice number) in its Unload method. One approach is to have code in the AfterRowColChange of your grid to update some property.

The whole thing would llok like:
* --------- MAIN FORM
* Command Button's Click
local lnInvoiceNumber

thisform.grdDetail.RecordSource = ""

do form InvoicePicker to lnInvoiceNumber

select * from Invoices where InvoiceNo = lnInvoiceNumber into cursor Detail

thisform.grdDetail.RecordSource = "Detail"


* -------------- SECOND FORM
* Grid's AfterRowColChange
thisform.nInvoiceNumber = Table.InvoiceNo

* Form's Unload
return Table.InvoiceNo
Hope this helps


>Dear Glenn,
> I am not understand the method you told me. Do you have any sample code for reference?
> I would like to describe more details about what i am try to do. Let's me give a sample.
>1)I have a main form that for display and key in Invoice details. A grid is keep record of the Invoice sales items record. Each items records have unique Invoice number.
>2) after key in all the sales items record of the Invoice, the records will save into Invoice Table which they will have same invoice number(primary key)
>3) i will have another form(to search out the particular invoice details) which have a grid and have records sort by the invoice number.
>4) if chose the particular invoice number, i wish to pass the parameter to the main form for display the chosed invoice sales items records on the main form grid.
>5) in that way, i can modify the records or delete the records or whole invoice record.
>
>Do you think that is posible to do it with the way you told me ? and how ?thanks
>
>
>regards,
>kengwen
Previous
Reply
Map
View

Click here to load this message in the networking platform