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

Query and display record number only in a webpage

P: n/a
I'm writing you from Alajuela, Costa Rica. It's 4:30 in the morning
here and I'm reaching a point of pure desperation as I've been
searching the internet all night for a solution. I am not an access
wizard. I just started looking at it actually because I'm trying to
learn about asp pages and storing form information.

I'm trying desperately to find a solution to displaying ONLY the record
number of the last entry into the form. I'm trying to setup a page for
a ticket raffle. The people fill out their information on the form and
click send. I then want a separate webpage to display the ms record
number of that entry. When we reach 100 entries the draw will begin.
So this way anyone can log onto the website and see how many entries
(or ms records) have been entered so far without seeing the personal
information (name, address, phone, etc.) of the people entering their
data for the raffle

The idea is they will enter their information into a FP2000 web form.
Everytime someone enters their information and clicks send, there
should be an update sent to a seperate page that tracks the count of
entrants. Kinda like McDonalds clicker of how many burgers sold thing.
Anyone logging onto the site will know what number of entries we're
at.

Please forgive my writing. I'm usually so much more coherent. I'm
just exhausted right about now.

T.I.A.
Athena

Jan 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I don't know much about data access pages through MS Access, but can't
you just use some simple SQL here? Something like:
SELECT Count(tblEntries.ID) AS NumberOfEntries FROM tblEntries

That would give you the current number of entries. If nothing else, you
could create a table to hold just that number and use an UPDATE
statement to change that number when the user adds a new entry.

Jan 7 '06 #2

P: n/a
Red
To quickly get the record count of the table you are working in, use
the "recordcount" property of the recordset....

i.e.
dim RS as Recordset, Totalrecords as Integer
set RS = currentdb.openrecordset("Your table name here")
totalrecords = RS.recordcount

Jan 7 '06 #3

P: n/a
Recordset.Recordcount doesn't always return the correct count, though.
I've seen many situations where the RecordCount property returned -1
even though I could iterate through the recordset with no problem -
i.e. there were 20 or so records in it. One thing I've seen suggested
is to call Recordset.MoveLast and then Recordset.MoveFirst right away
so all available records are iterated through, which apparently causes
the RecordCount property to contain the correct number.

Jan 9 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.