record operations on a form

  • Thread starter Thread starter Leaf
  • Start date Start date
L

Leaf

Hello,

I have created a form with some buttons to search by name,
first record or last record. However, when the form is
opened from a FormStartUpPage, those buttons do not work.
I will receive a message such as "you can not go to the
specific record." Only after I put the cursor in the id
field and click sort under Tools, will those buttons start
to work. Why is that?

Someone suggested I create a query with sort order
specified and then create a form based on the query. Is
there a way to output all the variables to a query and be
able to specify the sort criterion? Do I need to
reconstruct a form? Could I go to the form to have the
source be changed from the table to the query to which
this form is attached?

This message follows my prior message "sort the records."

Thank you.

Leaf
 
Leaf,

Perhaps someone else will address the button operation
issue, although the following may make it moot.

I nearly always base forms on queries rather than the
table directly for several reasons, one of which is
displaying them in the order I want. Create a query
including all the fields in your form, and
choose "Ascending" or "Descending" in the field or fields
by which you want the recordset sorted. If you specify
more than one sort field, Access will sort by the leftmost
field first, and move right.

Save the query, open the form, and change the Form
Property Record Source to the name of the query.
 
Thank you so much for the tip. I made a query and
specified the id sort criterion. I then opened the form
and changed the form record source. When I opened the
form, those buttons still did not work.

leaf
 
Back
Top