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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why not use Parameter Prompts

Good Practices

Why not use Parameter Prompts

by  dhookom  Posted    (Edited  )
Parameter prompts in the criteria of queries is fairly common but have too many limitations. IMHO, users should never be subjected to them.
[ul]
[li]They don't allow defaults[/li]
[li]They don't allow picking from a list[/li]
[li]They don't allow seeing multiple values at once[/li]
[li]They aren't easily re-used[/li]
[li]You can't check their integrity[/li]
[li]You can't limit one based on the value of another[/li]
[li]They don't support input masks or formats[/li]
[li]Their values can't be displayed in a report that returns no records[/li]
[li]They are annoying like pop-ups[/li]
[li]They are difficult to query with a foreign key value that has no meaning[/li]
[li]You rarely if ever find a parameter prompt type interface in any decent software application[/li]
[/ul]

Using values from controls on forms avoid the above limitations. Rather than SQL like
Code:
SELECT tblSales.*
FROM tblSales
WHERE SaleDate Between [Enter Start Date] and [Enter End Date]
Try build professional applications that use
Code:
SELECT tblSales.*
FROM tblSales
WHERE SaleDate Between Forms!frmDates![txStartDate] and Forms!frmDates![txtEndDate]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top