View Full Version : Limit number of records....


frankbutcher
03-29-2005, 11:27 PM
Hi All.
Is it possible to limit the number of records in a form, to a number given in a linked form.

For Example.

tblA
StreetName
No_Of_Houses


tblB
Name
Number

I would only want the number of records in tblB to be the same as No_Of_Houses in tblA.
I have seen previous threads where you can limit it to a number, but do not know where to go from there.

Can anyone help?

Thanks.

Frank.

Mile-O
03-30-2005, 03:05 AM
You would need to build the SQL yourself in a string and save it as a QueryDef.

The format for the SQL, rather than just SELECT would be SELECT TOP 5 if, for example, you wanted five results.