473,386 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

coding a form with dynamic record counts

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
1 1862
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Igorati | last post by:
Ok, this is what I have so far: #This program will ask for a user to imput numbers. The numbers will then be calculated #to find the statistical mean, mode, and median. Finallly the user will be...
25
by: Lin Ma | last post by:
Hi, I am wondering if I am doing right. Please advise. I create a system with 8 major steps and each step can go different direction. General speaking, a lot of if statements and functions...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
2
by: Gianluca_Venezia | last post by:
Talking about high number of record seem ridiculus, if this number is about 88.000 but when I open a form, linked via ODBC to a MYSQL table, the open and the use of that form is slow, and very...
16
by: usenet | last post by:
I want to be able to use the record numbers of a sub-form, are they available anyhow in VB (Access 2003)? I want to use the sub-form record number as *part* of the primary key for the table...
4
by: Matt | last post by:
I have the following in a page and I am trying to update a record on the next page but for some reason the form data is not carrying over. Any ideas why? <form name=nxtlupdate method=post...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
7
by: dino d. | last post by:
Hi- I want to create a dynamic image with areas so that when the user clicks different areas, the user jumps to those pages. The problem is, I can't seem to figure out how to do this efficiently....
5
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.