Count Records

  • Follow


Hi Guys,
How can I count records in a a combobox to allow me to scroll using the 
slider bar without first having to scroll to the bottom of the list?

Regards

John

0
Reply John 7/18/2007 2:42:52 PM

Count the records in the rowsource of the combobox:

NumRecord = DCount("*","NameOfTheRowSource")

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com






"John" <johnlee2509@btopenworld.com> wrote in message 
news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
> Hi Guys,
> How can I count records in a a combobox to allow me to scroll using the 
> slider bar without first having to scroll to the bottom of the list?
>
> Regards
>
> John
> 


0
Reply Steve 7/18/2007 3:14:45 PM

Or, simpler and faster (and likely more accurate)

NumRecord = Me!NameOfCombobox.ListCount

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Steve" <Sorry@private.emailaddress> wrote in message 
news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
> Count the records in the rowsource of the combobox:
>
> NumRecord = DCount("*","NameOfTheRowSource")
>
> PC Datasheet
> Providing Customers A Resource For Help With Access, Excel And Word
> Applications
> resource@pcdatasheet.com
>
>
>
>
>
>
> "John" <johnlee2509@btopenworld.com> wrote in message 
> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>> Hi Guys,
>> How can I count records in a a combobox to allow me to scroll using the 
>> slider bar without first having to scroll to the bottom of the list?
>>
>> Regards
>>
>> John
>>
>
> 


0
Reply Douglas 7/18/2007 3:31:24 PM

HI Guys
Thanks for the replies.
I have put this code in the onclick event of the combobox but it does not 
seem to work.
I am using access 2007, would this make a difference?

Regards

John


"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
> Or, simpler and faster (and likely more accurate)
>
> NumRecord = Me!NameOfCombobox.ListCount
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Steve" <Sorry@private.emailaddress> wrote in message 
> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>> Count the records in the rowsource of the combobox:
>>
>> NumRecord = DCount("*","NameOfTheRowSource")
>>
>> PC Datasheet
>> Providing Customers A Resource For Help With Access, Excel And Word
>> Applications
>> resource@pcdatasheet.com
>>
>>
>>
>>
>>
>>
>> "John" <johnlee2509@btopenworld.com> wrote in message 
>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>> Hi Guys,
>>> How can I count records in a a combobox to allow me to scroll using the 
>>> slider bar without first having to scroll to the bottom of the list?
>>>
>>> Regards
>>>
>>> John
>>>
>>
>>
>
> 

0
Reply John 7/18/2007 5:09:50 PM

What does "does not seem to work" mean? Are you getting an error message? If 
so, what's the error? If you're not getting an error message, what are you 
getting (and what do you expect to be getting)?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"John" <johnlee2509@btopenworld.com> wrote in message 
news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
> HI Guys
> Thanks for the replies.
> I have put this code in the onclick event of the combobox but it does not 
> seem to work.
> I am using access 2007, would this make a difference?
>
> Regards
>
> John
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
> news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>> Or, simpler and faster (and likely more accurate)
>>
>> NumRecord = Me!NameOfCombobox.ListCount
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Steve" <Sorry@private.emailaddress> wrote in message 
>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>> Count the records in the rowsource of the combobox:
>>>
>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>
>>> PC Datasheet
>>> Providing Customers A Resource For Help With Access, Excel And Word
>>> Applications
>>> resource@pcdatasheet.com
>>>
>>>
>>>
>>>
>>>
>>>
>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>> Hi Guys,
>>>> How can I count records in a a combobox to allow me to scroll using the 
>>>> slider bar without first having to scroll to the bottom of the list?
>>>>
>>>> Regards
>>>>
>>>> John
>>>>
>>>
>>>
>>
>>
> 


0
Reply Douglas 7/18/2007 5:23:39 PM

Thanks for the Reply Douglas,
Sorry for being vague.

There are no error messages, I have changed the code to use the name of my 
combobox.
If I drag the slder bar nothing happens, if I scroll to the last record I 
can then use the slider bar to move up and down.
I want to be able to scroll through the combobox list without going to the 
last record.

Reagrds

John

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:OPEZjBWyHHA.5380@TK2MSFTNGP04.phx.gbl...
> What does "does not seem to work" mean? Are you getting an error message? 
> If so, what's the error? If you're not getting an error message, what are 
> you getting (and what do you expect to be getting)?
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "John" <johnlee2509@btopenworld.com> wrote in message 
> news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
>> HI Guys
>> Thanks for the replies.
>> I have put this code in the onclick event of the combobox but it does not 
>> seem to work.
>> I am using access 2007, would this make a difference?
>>
>> Regards
>>
>> John
>>
>>
>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>> news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>>> Or, simpler and faster (and likely more accurate)
>>>
>>> NumRecord = Me!NameOfCombobox.ListCount
>>>
>>> -- 
>>> Doug Steele, Microsoft Access MVP
>>> http://I.Am/DougSteele
>>> (no e-mails, please!)
>>>
>>>
>>> "Steve" <Sorry@private.emailaddress> wrote in message 
>>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>>> Count the records in the rowsource of the combobox:
>>>>
>>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>>
>>>> PC Datasheet
>>>> Providing Customers A Resource For Help With Access, Excel And Word
>>>> Applications
>>>> resource@pcdatasheet.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>>> Hi Guys,
>>>>> How can I count records in a a combobox to allow me to scroll using 
>>>>> the slider bar without first having to scroll to the bottom of the 
>>>>> list?
>>>>>
>>>>> Regards
>>>>>
>>>>> John
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
> 

0
Reply John 7/18/2007 5:34:41 PM

To what slider bar are you referring? If you can't drag the slider bar, how 
do you get to the last record?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"John" <johnlee2509@btopenworld.com> wrote in message 
news:83437D02-1DD7-4BD8-B9F8-4EB88DDF3BCF@microsoft.com...
> Thanks for the Reply Douglas,
> Sorry for being vague.
>
> There are no error messages, I have changed the code to use the name of my 
> combobox.
> If I drag the slder bar nothing happens, if I scroll to the last record I 
> can then use the slider bar to move up and down.
> I want to be able to scroll through the combobox list without going to the 
> last record.
>
> Reagrds
>
> John
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
> news:OPEZjBWyHHA.5380@TK2MSFTNGP04.phx.gbl...
>> What does "does not seem to work" mean? Are you getting an error message? 
>> If so, what's the error? If you're not getting an error message, what are 
>> you getting (and what do you expect to be getting)?
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "John" <johnlee2509@btopenworld.com> wrote in message 
>> news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
>>> HI Guys
>>> Thanks for the replies.
>>> I have put this code in the onclick event of the combobox but it does 
>>> not seem to work.
>>> I am using access 2007, would this make a difference?
>>>
>>> Regards
>>>
>>> John
>>>
>>>
>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>>> news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>>>> Or, simpler and faster (and likely more accurate)
>>>>
>>>> NumRecord = Me!NameOfCombobox.ListCount
>>>>
>>>> -- 
>>>> Doug Steele, Microsoft Access MVP
>>>> http://I.Am/DougSteele
>>>> (no e-mails, please!)
>>>>
>>>>
>>>> "Steve" <Sorry@private.emailaddress> wrote in message 
>>>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>>>> Count the records in the rowsource of the combobox:
>>>>>
>>>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>>>
>>>>> PC Datasheet
>>>>> Providing Customers A Resource For Help With Access, Excel And Word
>>>>> Applications
>>>>> resource@pcdatasheet.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>>>> Hi Guys,
>>>>>> How can I count records in a a combobox to allow me to scroll using 
>>>>>> the slider bar without first having to scroll to the bottom of the 
>>>>>> list?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> John
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
> 


0
Reply Douglas 7/18/2007 6:22:48 PM

Douglas,
I can select and drag the slider bar but the records do not scroll at all.
If i click the sliderbar up and down arrows then i can scroll but i need to 
scroll faster.

If i select the sliderbar marker and drag downwards the records do not 
scroll.
When I stop scrolling with the sliderbar and release the left mouse button, 
a record is selected depending on how far doen i have scrolled.  this is not 
what i am looking for.

I have seen this done in other databases where the sliderbar can be selected 
and dragged up or down and the records scroll in synchronisation.

Regards

John



"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:unHpmiWyHHA.1168@TK2MSFTNGP02.phx.gbl...
> To what slider bar are you referring? If you can't drag the slider bar, 
> how do you get to the last record?
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "John" <johnlee2509@btopenworld.com> wrote in message 
> news:83437D02-1DD7-4BD8-B9F8-4EB88DDF3BCF@microsoft.com...
>> Thanks for the Reply Douglas,
>> Sorry for being vague.
>>
>> There are no error messages, I have changed the code to use the name of 
>> my combobox.
>> If I drag the slder bar nothing happens, if I scroll to the last record I 
>> can then use the slider bar to move up and down.
>> I want to be able to scroll through the combobox list without going to 
>> the last record.
>>
>> Reagrds
>>
>> John
>>
>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>> news:OPEZjBWyHHA.5380@TK2MSFTNGP04.phx.gbl...
>>> What does "does not seem to work" mean? Are you getting an error 
>>> message? If so, what's the error? If you're not getting an error 
>>> message, what are you getting (and what do you expect to be getting)?
>>>
>>> -- 
>>> Doug Steele, Microsoft Access MVP
>>> http://I.Am/DougSteele
>>> (no e-mails, please!)
>>>
>>>
>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>> news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
>>>> HI Guys
>>>> Thanks for the replies.
>>>> I have put this code in the onclick event of the combobox but it does 
>>>> not seem to work.
>>>> I am using access 2007, would this make a difference?
>>>>
>>>> Regards
>>>>
>>>> John
>>>>
>>>>
>>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in 
>>>> message news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>>>>> Or, simpler and faster (and likely more accurate)
>>>>>
>>>>> NumRecord = Me!NameOfCombobox.ListCount
>>>>>
>>>>> -- 
>>>>> Doug Steele, Microsoft Access MVP
>>>>> http://I.Am/DougSteele
>>>>> (no e-mails, please!)
>>>>>
>>>>>
>>>>> "Steve" <Sorry@private.emailaddress> wrote in message 
>>>>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>>>>> Count the records in the rowsource of the combobox:
>>>>>>
>>>>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>>>>
>>>>>> PC Datasheet
>>>>>> Providing Customers A Resource For Help With Access, Excel And Word
>>>>>> Applications
>>>>>> resource@pcdatasheet.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>>>>> Hi Guys,
>>>>>>> How can I count records in a a combobox to allow me to scroll using 
>>>>>>> the slider bar without first having to scroll to the bottom of the 
>>>>>>> list?
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> John
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
> 

0
Reply John 7/18/2007 6:47:47 PM

I'm very confused. It sounds as though you're talking about the scroll bar 
for the form itself. What does that have to do with knowing how many records 
exist in the combo box?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"John" <johnlee2509@btopenworld.com> wrote in message 
news:D59937ED-6D41-4911-A3F5-894A0B4EA790@microsoft.com...
> Douglas,
> I can select and drag the slider bar but the records do not scroll at all.
> If i click the sliderbar up and down arrows then i can scroll but i need 
> to scroll faster.
>
> If i select the sliderbar marker and drag downwards the records do not 
> scroll.
> When I stop scrolling with the sliderbar and release the left mouse 
> button, a record is selected depending on how far doen i have scrolled. 
> this is not what i am looking for.
>
> I have seen this done in other databases where the sliderbar can be 
> selected and dragged up or down and the records scroll in synchronisation.
>
> Regards
>
> John
>
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
> news:unHpmiWyHHA.1168@TK2MSFTNGP02.phx.gbl...
>> To what slider bar are you referring? If you can't drag the slider bar, 
>> how do you get to the last record?
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "John" <johnlee2509@btopenworld.com> wrote in message 
>> news:83437D02-1DD7-4BD8-B9F8-4EB88DDF3BCF@microsoft.com...
>>> Thanks for the Reply Douglas,
>>> Sorry for being vague.
>>>
>>> There are no error messages, I have changed the code to use the name of 
>>> my combobox.
>>> If I drag the slder bar nothing happens, if I scroll to the last record 
>>> I can then use the slider bar to move up and down.
>>> I want to be able to scroll through the combobox list without going to 
>>> the last record.
>>>
>>> Reagrds
>>>
>>> John
>>>
>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>>> news:OPEZjBWyHHA.5380@TK2MSFTNGP04.phx.gbl...
>>>> What does "does not seem to work" mean? Are you getting an error 
>>>> message? If so, what's the error? If you're not getting an error 
>>>> message, what are you getting (and what do you expect to be getting)?
>>>>
>>>> -- 
>>>> Doug Steele, Microsoft Access MVP
>>>> http://I.Am/DougSteele
>>>> (no e-mails, please!)
>>>>
>>>>
>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>> news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
>>>>> HI Guys
>>>>> Thanks for the replies.
>>>>> I have put this code in the onclick event of the combobox but it does 
>>>>> not seem to work.
>>>>> I am using access 2007, would this make a difference?
>>>>>
>>>>> Regards
>>>>>
>>>>> John
>>>>>
>>>>>
>>>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in 
>>>>> message news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>>>>>> Or, simpler and faster (and likely more accurate)
>>>>>>
>>>>>> NumRecord = Me!NameOfCombobox.ListCount
>>>>>>
>>>>>> -- 
>>>>>> Doug Steele, Microsoft Access MVP
>>>>>> http://I.Am/DougSteele
>>>>>> (no e-mails, please!)
>>>>>>
>>>>>>
>>>>>> "Steve" <Sorry@private.emailaddress> wrote in message 
>>>>>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>>>>>> Count the records in the rowsource of the combobox:
>>>>>>>
>>>>>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>>>>>
>>>>>>> PC Datasheet
>>>>>>> Providing Customers A Resource For Help With Access, Excel And Word
>>>>>>> Applications
>>>>>>> resource@pcdatasheet.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>>>>>> Hi Guys,
>>>>>>>> How can I count records in a a combobox to allow me to scroll using 
>>>>>>>> the slider bar without first having to scroll to the bottom of the 
>>>>>>>> list?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> John
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
> 


0
Reply Douglas 7/18/2007 6:52:58 PM

Douglas,
I cannot make this any more clear than I already have.

When you have a combobox which has its listrows set to 20 and there are more 
than 20 records a scroll bar appears to be able to view further than the 20 
records shown.

I want to be able to drag "the box on the scroll bar" in the combobox and 
scroll through records, without first having to goto the bottom of the list 
(Counting the Records)

If you are confused, imagine my Dilemma.

Regards

John




"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:eEbddzWyHHA.1204@TK2MSFTNGP03.phx.gbl...
> I'm very confused. It sounds as though you're talking about the scroll bar 
> for the form itself. What does that have to do with knowing how many 
> records exist in the combo box?
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "John" <johnlee2509@btopenworld.com> wrote in message 
> news:D59937ED-6D41-4911-A3F5-894A0B4EA790@microsoft.com...
>> Douglas,
>> I can select and drag the slider bar but the records do not scroll at 
>> all.
>> If i click the sliderbar up and down arrows then i can scroll but i need 
>> to scroll faster.
>>
>> If i select the sliderbar marker and drag downwards the records do not 
>> scroll.
>> When I stop scrolling with the sliderbar and release the left mouse 
>> button, a record is selected depending on how far doen i have scrolled. 
>> this is not what i am looking for.
>>
>> I have seen this done in other databases where the sliderbar can be 
>> selected and dragged up or down and the records scroll in 
>> synchronisation.
>>
>> Regards
>>
>> John
>>
>>
>>
>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>> news:unHpmiWyHHA.1168@TK2MSFTNGP02.phx.gbl...
>>> To what slider bar are you referring? If you can't drag the slider bar, 
>>> how do you get to the last record?
>>>
>>> -- 
>>> Doug Steele, Microsoft Access MVP
>>> http://I.Am/DougSteele
>>> (no e-mails, please!)
>>>
>>>
>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>> news:83437D02-1DD7-4BD8-B9F8-4EB88DDF3BCF@microsoft.com...
>>>> Thanks for the Reply Douglas,
>>>> Sorry for being vague.
>>>>
>>>> There are no error messages, I have changed the code to use the name of 
>>>> my combobox.
>>>> If I drag the slder bar nothing happens, if I scroll to the last record 
>>>> I can then use the slider bar to move up and down.
>>>> I want to be able to scroll through the combobox list without going to 
>>>> the last record.
>>>>
>>>> Reagrds
>>>>
>>>> John
>>>>
>>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in 
>>>> message news:OPEZjBWyHHA.5380@TK2MSFTNGP04.phx.gbl...
>>>>> What does "does not seem to work" mean? Are you getting an error 
>>>>> message? If so, what's the error? If you're not getting an error 
>>>>> message, what are you getting (and what do you expect to be getting)?
>>>>>
>>>>> -- 
>>>>> Doug Steele, Microsoft Access MVP
>>>>> http://I.Am/DougSteele
>>>>> (no e-mails, please!)
>>>>>
>>>>>
>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>> news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
>>>>>> HI Guys
>>>>>> Thanks for the replies.
>>>>>> I have put this code in the onclick event of the combobox but it does 
>>>>>> not seem to work.
>>>>>> I am using access 2007, would this make a difference?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> John
>>>>>>
>>>>>>
>>>>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in 
>>>>>> message news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>>>>>>> Or, simpler and faster (and likely more accurate)
>>>>>>>
>>>>>>> NumRecord = Me!NameOfCombobox.ListCount
>>>>>>>
>>>>>>> -- 
>>>>>>> Doug Steele, Microsoft Access MVP
>>>>>>> http://I.Am/DougSteele
>>>>>>> (no e-mails, please!)
>>>>>>>
>>>>>>>
>>>>>>> "Steve" <Sorry@private.emailaddress> wrote in message 
>>>>>>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>>>>>>> Count the records in the rowsource of the combobox:
>>>>>>>>
>>>>>>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>>>>>>
>>>>>>>> PC Datasheet
>>>>>>>> Providing Customers A Resource For Help With Access, Excel And Word
>>>>>>>> Applications
>>>>>>>> resource@pcdatasheet.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>>>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>>>>>>> Hi Guys,
>>>>>>>>> How can I count records in a a combobox to allow me to scroll 
>>>>>>>>> using the slider bar without first having to scroll to the bottom 
>>>>>>>>> of the list?
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>>
>>>>>>>>> John
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
> 

0
Reply John 7/18/2007 9:09:16 PM

John is right. I never noticed this peculiarity before.  If you have a 
combobox that displays say, 20 rows and the total number of rows is in the 
hundreds, you can't get to the bottom of the list easily.  If you drag the 
scroll button to the bottom, when you release the mouse button, the button 
jumps up and you don't get the bottom of the list. You may have to drag the 
button to the bottom a dozen times or more to finally get it down there 
where the 'zzzz's are.  Clicking or Shift-Clicking the bottom of the scroll 
column does no better.
A workaround is to type an 'x' or a 'z' and then click the combobox drop 
down. The list will start with the first row matching 'x' or 'z'.  Maybe 
this is what I do intuitively, so I never noticed the behavior above.

UpRider

"John" <johnlee2509@btopenworld.com> wrote in message 
news:31EC6B61-8EC4-4460-B183-5FDF63117DCF@microsoft.com...
> Douglas,
> I cannot make this any more clear than I already have.
>
> When you have a combobox which has its listrows set to 20 and there are 
> more than 20 records a scroll bar appears to be able to view further than 
> the 20 records shown.
>
> I want to be able to drag "the box on the scroll bar" in the combobox and 
> scroll through records, without first having to goto the bottom of the 
> list (Counting the Records)
>
> If you are confused, imagine my Dilemma.
>
> Regards
>
> John
>
>
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
> news:eEbddzWyHHA.1204@TK2MSFTNGP03.phx.gbl...
>> I'm very confused. It sounds as though you're talking about the scroll 
>> bar for the form itself. What does that have to do with knowing how many 
>> records exist in the combo box?
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "John" <johnlee2509@btopenworld.com> wrote in message 
>> news:D59937ED-6D41-4911-A3F5-894A0B4EA790@microsoft.com...
>>> Douglas,
>>> I can select and drag the slider bar but the records do not scroll at 
>>> all.
>>> If i click the sliderbar up and down arrows then i can scroll but i need 
>>> to scroll faster.
>>>
>>> If i select the sliderbar marker and drag downwards the records do not 
>>> scroll.
>>> When I stop scrolling with the sliderbar and release the left mouse 
>>> button, a record is selected depending on how far doen i have scrolled. 
>>> this is not what i am looking for.
>>>
>>> I have seen this done in other databases where the sliderbar can be 
>>> selected and dragged up or down and the records scroll in 
>>> synchronisation.
>>>
>>> Regards
>>>
>>> John
>>>
>>>
>>>
>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>>> news:unHpmiWyHHA.1168@TK2MSFTNGP02.phx.gbl...
>>>> To what slider bar are you referring? If you can't drag the slider bar, 
>>>> how do you get to the last record?
>>>>
>>>> -- 
>>>> Doug Steele, Microsoft Access MVP
>>>> http://I.Am/DougSteele
>>>> (no e-mails, please!)
>>>>
>>>>
>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>> news:83437D02-1DD7-4BD8-B9F8-4EB88DDF3BCF@microsoft.com...
>>>>> Thanks for the Reply Douglas,
>>>>> Sorry for being vague.
>>>>>
>>>>> There are no error messages, I have changed the code to use the name 
>>>>> of my combobox.
>>>>> If I drag the slder bar nothing happens, if I scroll to the last 
>>>>> record I can then use the slider bar to move up and down.
>>>>> I want to be able to scroll through the combobox list without going to 
>>>>> the last record.
>>>>>
>>>>> Reagrds
>>>>>
>>>>> John
>>>>>
>>>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in 
>>>>> message news:OPEZjBWyHHA.5380@TK2MSFTNGP04.phx.gbl...
>>>>>> What does "does not seem to work" mean? Are you getting an error 
>>>>>> message? If so, what's the error? If you're not getting an error 
>>>>>> message, what are you getting (and what do you expect to be getting)?
>>>>>>
>>>>>> -- 
>>>>>> Doug Steele, Microsoft Access MVP
>>>>>> http://I.Am/DougSteele
>>>>>> (no e-mails, please!)
>>>>>>
>>>>>>
>>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>>> news:B836E99D-312F-4206-9832-A92031F1B494@microsoft.com...
>>>>>>> HI Guys
>>>>>>> Thanks for the replies.
>>>>>>> I have put this code in the onclick event of the combobox but it 
>>>>>>> does not seem to work.
>>>>>>> I am using access 2007, would this make a difference?
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> John
>>>>>>>
>>>>>>>
>>>>>>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in 
>>>>>>> message news:%23OpQ0CVyHHA.4928@TK2MSFTNGP03.phx.gbl...
>>>>>>>> Or, simpler and faster (and likely more accurate)
>>>>>>>>
>>>>>>>> NumRecord = Me!NameOfCombobox.ListCount
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Doug Steele, Microsoft Access MVP
>>>>>>>> http://I.Am/DougSteele
>>>>>>>> (no e-mails, please!)
>>>>>>>>
>>>>>>>>
>>>>>>>> "Steve" <Sorry@private.emailaddress> wrote in message 
>>>>>>>> news:F7qni.8871$Od7.8171@newsread1.news.pas.earthlink.net...
>>>>>>>>> Count the records in the rowsource of the combobox:
>>>>>>>>>
>>>>>>>>> NumRecord = DCount("*","NameOfTheRowSource")
>>>>>>>>>
>>>>>>>>> PC Datasheet
>>>>>>>>> Providing Customers A Resource For Help With Access, Excel And 
>>>>>>>>> Word
>>>>>>>>> Applications
>>>>>>>>> resource@pcdatasheet.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> "John" <johnlee2509@btopenworld.com> wrote in message 
>>>>>>>>> news:0E1DBE7E-AD54-4715-A547-EC2DDE9CDE39@microsoft.com...
>>>>>>>>>> Hi Guys,
>>>>>>>>>> How can I count records in a a combobox to allow me to scroll 
>>>>>>>>>> using the slider bar without first having to scroll to the bottom 
>>>>>>>>>> of the list?
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> John
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
> 


0
Reply UpRider 7/18/2007 10:07:57 PM

John wrote:
>When you have a combobox which has its listrows set to 20 and there are more 
>than 20 records a scroll bar appears to be able to view further than the 20 
>records shown.
>
>I want to be able to drag "the box on the scroll bar" in the combobox and 
>scroll through records, without first having to goto the bottom of the list 
>(Counting the Records)


Kahuna had this same question just yesterday.  Try using a
line of code in the form's Load event:

	x = combobox.ListCount

-- 
Marsh
MVP [MS Access]
0
Reply Marshall 7/18/2007 10:36:55 PM

Thanks Marshall
I though I was going mad.

That worked a treat.

Thanks for all your help Douglas, sorry for causing any headaches.

Kind Regards

John

"Marshall Barton" <marshbarton@wowway.com> wrote in message 
news:e75t93hk8u5k9qqdt4mcb5fapgrgr66o7e@4ax.com...
> John wrote:
>>When you have a combobox which has its listrows set to 20 and there are 
>>more
>>than 20 records a scroll bar appears to be able to view further than the 
>>20
>>records shown.
>>
>>I want to be able to drag "the box on the scroll bar" in the combobox and
>>scroll through records, without first having to goto the bottom of the 
>>list
>>(Counting the Records)
>
>
> Kahuna had this same question just yesterday.  Try using a
> line of code in the form's Load event:
>
> x = combobox.ListCount
>
> -- 
> Marsh
> MVP [MS Access] 

0
Reply John 7/19/2007 2:33:50 PM

12 Replies
180 Views

(page loaded in 0.172 seconds)

Similiar Articles:































7/26/2012 8:20:42 PM


Reply: