You can sort a form by right-clicking the field you wish to sort by (whether
price, year, etc), and choosing "Sort Ascending". If you want to do it
Me.OrderBy = "Price"
Me.OrderByOn = True
The check boxes are bound to a yes/no field in the table? To clear all the
boxes each time the form is opened, you could execute an Update query
statement in the form's Open event. Set the form's On Open property (Event
tab of the Properties box) to:
Click the build button beside this (...) to open the code window. Enter the
RunSQL line in between the "Private Sub..." and "End Sub":
Private Sub Form_Open(Cancel As Integer)
RunSQL "UPDATE [MyTable] SET [MyYesNoField] = False WHERE [MyYesNoField]
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - [url]http://allenbrowne.com/tips.html[/url]
Reply to the newsgroup. (Email address has spurious "_SpamTrap")
"ben" <mitchellbhotmail.com> wrote in message
news:0a9c01c34bde$3cacb400$a001280aphx.gbl...> i have a switchboard that i can open several different
> forms. one form allows me to select records to be
> displayed on a report through the use of check boxes.
> I.E. i open the form, check the box of the records that i
> want to compare, then close the form.
> I would like to add two features to this form, but i cant
> figure out how.
> First and foremost...i would like to be able to reorder
> each field through the use of a control button. This is
> similar to what eBay and others use to sort their
> auctions in ascending/descending order using price, year,
> etc.......any suggestions/solutions will be appreciated.
> Secondly...each time the form is opened, i would like to
> make it clear the check boxes...i have tried to set the
> check boxes to false in the On Open event, but i am an
> access amatuer and cant get it to work...
> once again, thanks for any help