|
-
Jul 15th, 2003, 10:23 AM
#1
Thread Starter
Addicted Member
How many records? [Resolved]
I need a bit of code...
I could do with a record count. To show how many records are being displayed...
the figure being outputted to a textbox....
this figure will change depending on what filters I put on the page....
so if I only show records which have a boolean value of -1 for a check box I need the count to realise it's counting them...
I know it does it automatically at the bottom of the form, but I want to put it in a text box, any ideas?
Last edited by Bazzlad; Aug 13th, 2003 at 04:37 AM.
-
Jul 15th, 2003, 05:35 PM
#2
Fanatic Member
You can set TextBox text to the value of Me.RecordCount or in Access you can use "=Count(*)".
-
Jul 16th, 2003, 03:04 AM
#3
Thread Starter
Addicted Member
Cheers mate!
-
Jul 16th, 2003, 04:26 AM
#4
Thread Starter
Addicted Member
Argghh, nearly people...
recordset.recordcount Shows which record I'm on.... record 1, record 2 etc, I need the TOTAL of records.....?
Or the LAST record...
-
Jul 16th, 2003, 04:51 AM
#5
Thread Starter
Addicted Member
Done it at bloody last, sloppy code always comes through
VB Code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmstockview"
stLinkCriteria = "[Item]=" & "'" & Me![Combo7] & "'"
stLinkCriteria = "[used?] = 0"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acLast
[Forms]![frmstockview]![Text9].Value = [Forms]![frmstockview].Recordset.RecordCount
DoCmd.GoToRecord , , acFirst
Thanx for your help and time.
-
Jul 28th, 2003, 01:22 PM
#6
Lively Member
The other thing for you to look at is seting the CursorLocation to adUseClient. This will give you a record count ... USING the RecordCount method of the cursor even ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|