Help!

How many lines are in a continuous form

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  Defining Relationships/Primary Keys between two t..  
Author Message
Eric D. Braden
External


Since: Mar 27, 2007
Posts: 5



PostPosted: Mon Nov 02, 2009 7:13 am    Post subject: How many lines are in a continuous form
Archived from groups: microsoft>public>access (more info?)

Is there a programatic way to determine how many lines or records are
visible in a continuous form? Specifically, I want to be able to
include the blank record that appears when you begin entering data
into a new record that you have not yet saved.

For context:
I have a continuous subform on my main form. I have code that counts
the record in the table linked to the subform. The code uses that
count to resize the subform control on the main form. As such, it
doesn't show that extra line until the record is saved. So, a user
mouse clicking through the combo box on the subform is required to
click outside of the box or use some other method to force a save in
order for the next entry line to appear.

This is my current code:

Me.Parent.sub_CourseMod.Height = (DCount("CourseID", "t_CourseMod",
"CourseID = Forms.f_CourseEdit.CourseID") + 1) * 315

Thanks for any advice,

Eric B.
Back to top
Eric D. Braden
External


Since: Mar 27, 2007
Posts: 5



PostPosted: Mon Nov 02, 2009 7:38 am    Post subject: Re: How many lines are in a continuous form [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Looks like I posted just a bit too soon. Shortly after posting I
realized that the OnDirty event is (I think) what I'm looking for.

The only problem is putting some similar code into OnDirty makes odd
things happen. I'm unable to actually select anything after the first
time, and right clicking crashes Access.

On Nov 2, 9:13 am, "Eric D. Braden" <bradener....TakeThisOut@hotmail.com> wrote:
> Is there a programatic way to determine how many lines or records are
> visible in a continuous form?  Specifically, I want to be able to
> include the blank record that appears when you begin entering data
> into a new record that you have not yet saved.
>
> For context:
> I have a continuous subform on my main form.  I have code that counts
> the record in the table linked to the subform.  The code uses that
> count to resize the subform control on the main form.  As such, it
> doesn't show that extra line until the record is saved.  So, a user
> mouse clicking through the combo box on the subform is required to
> click outside of the box or use some other method to force a save in
> order for the next entry line to appear.
>
> This is my current code:
>
> Me.Parent.sub_CourseMod.Height = (DCount("CourseID", "t_CourseMod",
> "CourseID = Forms.f_CourseEdit.CourseID") + 1) * 315
>
> Thanks for any advice,
>
> Eric B.
Back to top
Hans Up
External


Since: Apr 21, 2009
Posts: 33



PostPosted: Mon Nov 02, 2009 12:27 pm    Post subject: Re: How many lines are in a continuous form [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric D. Braden wrote:
> Looks like I posted just a bit too soon. Shortly after posting I
> realized that the OnDirty event is (I think) what I'm looking for.

OnDirty will fire when you enter data in the new record. However, it
will also fire when you change a value in an existing record. Is that
what you want?

I'm not sure what you want, but wonder if Me.NewRecord and/or
Me.RecordsetClone.RecordCount might be helpful.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum