>>I am trying to build a general "Search Form" class which will respond to any form that calls it. It will take paramters for a SQL-Select "from", "where", "order by", and # of grid columns to show.
>>
>>In a calling form, I added these properties:
>>rSearchTable
>>rSearchField
>>rSearchSort
>>rSearchGridCols
>>
>>The click event's method has some spaghetti and then:
>>OrdProc.rSearchTable = 'OrdProc_DonorInf1'
>>OrdProc.rSearchField = 'cName_Last'
>>OrdProc.rSearchSort = 'cDonor_No'
>>OrdProc.rSearchGridCols = 4
>>lfSearchForm.Show(1)
>>
>>The called form class also has the above properties.
>>How do I get the properties from the calling form into the properties of the called form class?
>
>Add these properties to the called [Search] form class then populate them using the followint code in the calliong form click:
>with lfSearchForm
> .rSearchTable = 'OrdProc_DonorInf1'
> .rSearchField = 'cName_Last'
> .rSearchSort = 'cDonor_No'
> .rSearchGridCols = 4
> .Show(1)
>endwith
Thanks for the with...endwith information. I already had the properties defined in the called Search Form, but it still doesn't seem to work unless I already have the table SELECTed before the code acutally fires. So I put a SELECT MYTABLE in the Init method of the form and it works now.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only