Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a field value to filter another form.

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I want to use the value of a field in a form table to generate the filter of another form.
For example, on form Material.DB I have a field entitled "Plate ID". I want to click on the required ID and then click a button which generates either a report or another form showing all parts place on the plate (taken from a linked table).

Has anyone any ideas on how to go about this?

Thanks,

Woody.
 
Use WriteEnvironmentString() to pass a variable containing the plate number, then use ReadEnvironmentString() to read the variable do a locate on your primary linked table's corresponding field when the new form opens.

Mac :)

"Strange women lying in ponds and distributing swords is no basis for a system of government" - Dennis, age 37

mailto:langley_mckelvy@cd4.co.harris.tx.us
 
Use WriteEnvironmentString() to pass a variable containing the plate number, then use ReadEnvironmentString() to read the variable and do a locate on your primary linked table's corresponding field when the new form opens.

Mac :)

"Strange women lying in ponds and distributing swords is no basis for a system of government" - Dennis, age 37

mailto:langley_mckelvy@cd4.co.harris.tx.us
 
Woody,

Mac lists one way to do this. There are a couple of others, both documented on my website. Please see for a walkthrough using the samples provided with Paradox. This article guides you through adding a button and writing code that executes a query and then opens a report using the results.

Another article, demonstrates the use of TCursors. While not as extensive as the earlier one, it demonstrates techniques that perform more quickly in a multi-user setup.

In general, you should try to use index-based techniques (such as tCursors, setRange, and so forth) as opposed to non-indexed ones (QBE queries, filters, etc). The primary reson for this stems from the amount of data that needs to be processed to obtain the results. In general, you may not notice a lot of difference on a single-user setup, however, if you want to put this on a network at some point, the performance difference will be very apparent.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top