limit a continous form to 10 rows/records?

G

Guest

Good day,

Is it possible to limit a continous form to a certain number of records?
in the scrolling box?

Thanks,

Brook
 
A

Al Camp

Brook,
In the query behind your subform, in the query properties dialog
box...check out Top Value.
You may have to expirement with the sorting to get the TopValue = 10
records you want.
hth
Al Camp
 
G

Guest

I don't think you can limit the form but you certainly can limit the
recordset of the form to return a set number of records. Look for help with
"Top" in SQL.

In Access' query tool, right click a blank spot in the top section and click
"Properties...". Set the "Top Values" property to the number of records you
want to see in your form. Remember, the specific records that are displayed
will depend on the sorting.
 
G

Guest

Thanks...

I tried that, but it will only show the top 10 and will not give me the
option to scroll to more records.

brook
 
A

Al Camp

You wrote...
Is it possible to limit a continous form to a certain number of records?
in the scrolling box?
So... TopValue is the solution question... as stated.

You could add a "toggle" button to your subform footer that toggles between
an "ALL" RecordSource query for the subform and a "Top10" RecordSource
query. Click it and the sub shows ALL, click again and it shows Top10.

Create two SQL statements and swap them out alternately... use the ONClick
event of an example button named cmdAllorTop10...

If cmdAllorTopTen.caption = "ALL" Then
Me.RecordSource = 'your All SQL statement here
Else
Me.RecordSource = 'your Top10SQL statement here
End if

hth
Al Camp
 

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