record operations on a form

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
 
K

Kevin Sprinkel

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.
 
L

leaf

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top