By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,248 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,248 IT Pros & Developers. It's quick & easy.

coding a form with dynamic record counts

P: n/a
I'm not sure if my title is correct, but here's what I'm trying to do:

I have a form that displays the current number of patients and the total
number of tickets for that patient population as a DLookup to a couple of
text boxes. This information stays static. I have a few filters (on both
patients & tickets) available allowing the user to select a date range and
also patient sub-groups. What I would like to do is have a couple of new
text boxes (under the ones indicated above) that reflects the number of
available patients and tickets based on the current status of the filters. I
would like these to respond as changes are made.

How would I go about doing this? I assume you would use an event handler
(OnChange, OnUpdate, etc.) or to you 'refresh' the form by manipulating the
timer?

I'm using Access 2K.

Thanks!

Dave
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Dave,

Put this code after the code where ever you apply your filters:
Dim Rst As DAO.Recordset
Set Rst = Me.RecordsetClone
If Rst <> 0 Then
Rst.MoveLast
End If
Me!NameOfTextBox = Rst.RecordCount
Rst.Close
Set Rst = Nothing
PS Thanks for everything you army guys do for us!!
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
"Dave B." <da***********@amedd.army.mil> wrote in message
news:3b**************************@posting.google.c om...
I'm not sure if my title is correct, but here's what I'm trying to do:

I have a form that displays the current number of patients and the total
number of tickets for that patient population as a DLookup to a couple of
text boxes. This information stays static. I have a few filters (on both
patients & tickets) available allowing the user to select a date range and
also patient sub-groups. What I would like to do is have a couple of new
text boxes (under the ones indicated above) that reflects the number of
available patients and tickets based on the current status of the filters. I
would like these to respond as changes are made.

How would I go about doing this? I assume you would use an event handler
(OnChange, OnUpdate, etc.) or to you 'refresh' the form by manipulating the
timer?

I'm using Access 2K.

Thanks!

Dave

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.