limit a continous form to 10 rows/records?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good day,

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

Thanks,

Brook
 
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
 
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.
 
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
 
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
 
Back
Top