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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the number of records displayed in a continuous subform.

Status
Not open for further replies.

seducedbycodes

Technical User
Jul 4, 2005
27
AU
hello,
i want to change the height of a continuous subform depending on how many records it contains. To do this i was going to use

NumRecords??
Me.QuoteSubform.Height = NumRecords*RecordHeight

this would be placed in the OnLoad event of the parent form
 
Hi
Here is some code I was playing with. It might help.
Code:
Dim NoRecs, RowHeight, SubHeight, ChangeHeight
DoCmd.MoveSize , , , 3000
NoRecs = Me.[table3 subform].Form.RecordsetClone.RecordCount
RowHeight = Me.[table3 subform].Form.RoomNo.Height
SubHeight = Me.[table3 subform].Height
ChangeHeight = NoRecs * RowHeight + (RowHeight * 4)
Me.[table3 subform].Height = ChangeHeight
DoCmd.MoveSize , , , (Me.WindowHeight + ChangeHeight)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top