Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fixed number of records

Status
Not open for further replies.

Mandrutza

Programmer
Feb 12, 2002
34
RO
Does anyone have an ideea about how to set a table to have a fixed number of records? It is possible in Access? I hope that tomorow I'll still be alive and kicking.
 
If accessing via a form, set the AllowAdditions property to false if you already have the exact amount you need. Otherwise, check in the On Current event and set it when the record number reaches that number.
 
I should better explain my problem. I have a web interface in wich I give to other users acces to an Access table.It creates an Access table for each user and I cannot change the interface to limitate the number of records in each table. This property must be set in db.I do not know how. Pls help! I hope that tomorow I'll still be alive and kicking.
 
What controls what records they get? Do they get them all and you only want them to get some? Are there criteria which control the records they get? What requires a specific number of records? Perhaps a little more background on what is causing the problem will help.

Good Luck!
 
I give access for each user to one table.I want to control taht table to contain only a fixed number of records.That's the only thing that I want to constraint. I hope that tomorow I'll still be alive and kicking.
 
Try using the Top N feature with a subselect. The following worked for me in Access2000:

Dim strSQL As String

strSQL = "Select * Into tblTemp From tblTest " _
& "Where groupid In " _
& " (Select Top 10 groupid From tblTest AS tblT "
& " Order By groupid)"

DoCmd.RunSQL strSQL

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top