Count Records

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
John
7/18/2007 2:42:52 PM
access.formscoding 7493 articles. 0 followers. Follow

12 Replies
1065 Views

Similar Articles

[PageSpeed] 48

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
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
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
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
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
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
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
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
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
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
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
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
John
7/19/2007 2:33:50 PM
Reply:

Similar Artilces:

Looping through records
Hi, I am learning some basic VBA in Excel. I know that using inout boxes is not the best way to input multiple cells, but as I said I am playing with VBA. The following code takes me through cells on a single row and allows me to enter some data. What I cannot work out is having enjtered data into H7 , how do I then switch to A8 and start the code again. Would appreciate some help if someone has a few minutes. Many thanks Jo CallCost = InputBox("Enter the cost of the call") Range("A7:H7").Select Range("A7").Select ActiveCell.FormulaR1C1 = TelephoneNumbe...

Getting the autonumber value after adding new record when dao points to SQL rather than JET
Access 2003, SQL 2000, Windows XP I usually worked in DAO and JET and have the luxury of being able to do the following: ----------------------------------------- dim lngClientId as long dim rs as recordset set rs = currentdb().openrecordset("tblClient") rs.addnew rs![Surname] = "test surname" rs![FirstName] = "test firstname" lngClientId = rs![ClientId] 'ClientId is an autonumber field rs.update rs.close set rs = nothing --------------------------------------- I end up with the value of the autonumber field after adding a new record. Of course this do...

Counting numeric but not Alpha
I have three columns and two rows (to make this easy). The first row of cells are blank. The second row uses a VLOOKUP that pulls a number based on a name entered into the first row. The first two columns have a name but the third is left blank (example I am looking up only two names at the time and not three). I want to add the numbers in the second row but if there is no name in the first row the second row shows as #N/A because the VLOOKUP is pulling no data at the moment. I want to sum up the numbers pulled by the VLOOKUP but the formula I have also counts the #N/A which...

Bill of Materials Record is locked
We are getting a message on one of our BOM's that says Record is locked. View only? Does anyone have any ideas. Thanks, Marie Nevermind I found the answer "marie" wrote: > We are getting a message on one of our BOM's that says Record is locked. > View only? Does anyone have any ideas. > > Thanks, > Marie Marie, Just for knowledge sharing, if there were no users have the BOM selected in BOM Maintenance Form or in BOM Mass Update then a record must be locked in "BMS10000" table and could be easily deleted. Regards, -- Mohammad R. Da...

Reference Previous Record 10-16-07
I'm trying to calculate a backlog (Amount of previous days backlog + amount received today - Amount processed today= Backlog). Currently I have a query that calculates amount received - amount processed, but I need it to reference the previous days backlog to add that to the equation. Is that possible? Yes, it is possible, but how you do it will depend on your table structure and what you want to do with the information? How do you want to display this information; in the results of a query, in a cell on a form, or some other method. -- Email address is not valid. Please reply t...

Parameter-driven report: record-selection not working properly
Hi Group, we made a parameter-driven report wich works fine on the first page, but after a user changes the page to display for the first time, the record selection does not work any more from then on, so all available records are displayed. Has anyone experienced the same problem and found a solution? Thanks for any help Michael ...

Counting based on multiple conditions including date range
I'm going to try to make this dilemma as simple to explain as possible by using a method we can all relate to :) Lets say I have the following table, with it being an extract from list of what I drank at the pub on certain dates: Code ------------------- |------A------|------B------| 20-Oct-03 Beer 25-Oct-03 Orange 13-Nov-03 Beer 16-Nov-03 Beer 18-Nov-03 Whiskey 20-Nov-03 Beer 27-Nov-03 Gin 03-Dec-03 Beer 05-Dec-03 Lemonade ... ------------------- Basically, I want a cell to then tell me how many times I had beer ...

Counting the amount of paydays between two dates
Hello I am currently unemployed but I have just created a spreadsheet i Excel 97 to help me to work out some savings when I get a new job(!) In A1 I have a start date (01/11/2004) In A2 I have an end date (01/11/2005) Is there a formula that will tell me how many paydays there will b between the two dates, if I specify the date of the first payday in for example, cell B1 -- Message posted from http://www.ExcelForum.com Sample only: In B1 - enter say 14 (If paid Bi-Weekly) or enter 7 (If Paid Weekly) In C1 - enter =INT((A2-A1)/B1) HTH "Prospero >" <<Prospero.1bss...

Record Macro and Edit Macro options disabled
Hi, I've downloaded the Excel 2007 trial and I'm want to record a macro but the button, along with the Visual Basic and Macros ones on the Code section of the Developer tab in the Excel Ribbon are disabled. I have the Macro Settings set to "Enable all macros" and ticked the "Trust access to the VBA project object model" in the trust center. I have closed an re-opened Excel and have tried creating new workbooks in 3 formats (extensions xlsx, xlsm, xlsb) but can't get the buttons enabled. What have I missed? Or are macros disabled in the trial version? Tha...

Help with counting formula
Here's the dilemma: I have a company that expands to a new city every X months. It takes 5 months for that city to reach full production (Y units). Each new city ramps up to Y units with a given formula. At full production, that city's units stays constant (Y). Every X months I need to add a new city that "ramps up" over 5 months. How can I make a formula that, everytime I increase the number of cities, it will ramp the city up to full procution over the 5 month period? IE: For Months 1-12, starting with 1 city and adding the 2nd at month 9: Production = 0, 2, 4,...

Selecting Distinct Records in union query/report
Using Access 2007. I have a table of clubs and a table of club_gifts. They are linked via a key club#. I want to produce a report of all clubs from the club table plus all records from the club_gifts. There may be multiple rows for a given club in the club_gifts table, but I only want one row with the total of the gift_amount. I have build a union query, but when a club has a record in the club_gift table, it appears twice in the query results, once as the row in the clubs table and once as a record in the club_gifts table. I only want the latter record to show. Is there a...

Record Selection
I am working with a part number that is 10-11 alpha numeric characters. I need to focus on the 8th character which represents the color of the item and make a selection as to the color. I started looking at the "Like" function, but couldn't figure out how to have it look at the 8th character only. I am using Access 2000. Any help would be appreciated. On Thu, 8 Apr 2010 13:51:02 -0700, Dmario wrote: > I am working with a part number that is 10-11 alpha numeric characters. I > need to focus on the 8th character which represents the color of the item a...

trans history removal report
When trying to clear out old data in the "trx history removal utility", i get a message that says "unable to remove this transaction: an open apply record exists or an apply record exists outside the selected range. When I go to apply record under the named vendor, it doesn't show anything remaining open. The voucher is closed and a discount was taken on this transaction, but it is causing my historical aging to be off by the amount of discount. If anyone has had any similiar situation or knows how to clear out this transaction, please let me know. Thanks ...

Access Data Collection using Email
I would like to use the above metioned feature to update the status of projects stored in our DB. However, I would like to constrain the email form sent to one specific record rather than all the records of the table I am creating the form from. There are approximately 4200 records in the table. I would like to send this email form for updated information on job status for ONE job to a specific email address. Is this possible? Or must it send a form for every record as it appears to be doing now? thank you, Michael On Thu, 6 Dec 2007 09:09:00 -0800, Michael F <Michael F@discussio...

Counting individual dates
I have a column of dates, some dates are repeated, and I would like a count of the number of separate dates. My sample column: 1/1/05 1/1/05 1/2/05 I want my return to be 2, because I have 2 different dates. Is there a way to do this? Thanx! Try... =SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&"")) Hope this helps! In article <3FD3EE87-AFC2-4854-9E70-1E1155D5798F@microsoft.com>, "Robin" <Robin@discussions.microsoft.com> wrote: > I have a column of dates, some dates are repeated, and I would like a count > of the number...

Rota spreadsheet
Hope someone can help as I'm at a total loss. I've got a rota that shows all personnel details, with shift patterns: 9am - 3pm 8am - 4pm 10pm - 4am etc (shift patterns subject to change and are individual) I have a column that shows them 'clocked on' and another for 'clocked off'. Now for legal purposes I need to know who is 'on' at regular intervals: 7 am 7.10 am 7.20 am 7.30 am so thinking logically I'd say if for the 7 am count if they are 'clocked in' but not 'clocked off' then count that person but I can't seem to find the r...

COUNT ON NON-CONTINOUS CELLS
Hi, Is there a way for me to get a count of cells (NOT in a RANGE) that have values greater than zero (0). i.e. A1=1 C3=0 D4=3 E2=0 E5=2 Result = 3 Thank you! Hi Gerard Try this =COUNT(IF(A1:C5>0,A1:A5)) This is an array formula you must press CTRL+SHIFT+ENTER to enter the formula. If successful in the Formula Bar you can see the curly braces at both ends like {=COUNT(IF(A1:C5>0,A1:A5))}. do not type them in yourself. HTH John "Gerard Sanchez" <geepeeoneREMOVEME@gmail.com> wrote in message news:OX4V5F5YKHA.5852@TK2MSFTNGP05.phx.gbl... > Hi, > > Is ...

No Current Record error
I am running an integration using 2 sources and the SQL Optimizer as the destination. I keep getting errors that say "No Current Record". Can anyone tell me what is causing this error and/or how to fix it? Thanks, The integration runs perfectly when I use the same 2 sources and the general journal as the destination. The problem comes when I switch the destination to use GL Transaction under SQL Opt 7.5. Other than that, everything is set up right as far as I can tell. Any ideas why that "No current record" error occurs? ...

Random Function for Selecting Records
Hi everyone, This should be simple. I'm trying to pull one random record from each group within a table. The groups are "Units" - geographic areas, and I want to select one random point (conveniently enough, "Point") from each Unit that satisfies certain criteria. Step 1 - query with a random number field - Rnd([EventID]), sorted by the random number field. EventID is an autonumber PK field. Then a query that performs the grouping (by Unit) and pulls the first value of interest (in this case Point) from the first record for each group. The problem is the...

CRM3: SHARING RECORD
Hi to all, i would like to use the sharing function in this way: when i share an account i would like that all the related entity will be shared, at moment i see that it shares only the account record and all the quote, orders and so on will not be visible to the systemUser who receive the sharing. Anyone know how to do that ? Thank's to all Jumpa there is no cascade sharing... to do this, you have to create a callout "Jumpa" <Jumpa@discussions.microsoft.com> wrote in message news:E8189BBE-541A-4BED-901D-52215A9F2F69@microsoft.com... > Hi to all, > i wo...

Count certain values
I have a spreadsheet that has column A with names, column B with their choice of meal. Example: A B John Steak Bill Chicken Joe Salmon May Steak Jean Chicken What I want to do is count how many of each dish are required (how many steaks, chickens to order) Can someone please show me the formula? Thanks Probably the easiest way would be to create a "master, unique" list of all available meals, say in Column C. Then, with names and choices filling A1 to B100, try this in D1: =Countif(B1:B100,C1) And copy down as needed. -- HTH, RD --------------...

See new record in puCombo Box
I have a form, "Users" sourced to a User table. I have another form,"OwnsBoats", sourced to another table. Within this other form, I have a combo box that is Row Sourced to the user table and Control Sourced to a field in the other form's underlying table. When I enter a new user in the User form, then open the OwnsBoats form, the combo box will not show the new user. I have tried OnUpdate docmd.runcmd accmdsave and I have had the code close the user form before opening the other form. The new user is definitely in the user table, but still doesn&...

Update multiple records/forms by making changes to one table
What I need to do is have one base table containing all the current information for raw materials (item #s, cost, etc..) that gets updated every time we receive one of the items already in the table with new information. Like if the cost has increased since the last time it was received, I can change the cost for one specific item, then have it update every record that one item is used in. I have 2 subforms where that item would be used repeatedly for different finished products that are made up of that item. How can I have every record in every form updated whenever I make a change to that ba...

To Record in Form View from Query
I have a query run from FORM view using a button. To view records associated with parameters built in the query. I would like to select the record and view it back in the FORM view and continue on editing from there. Is it possible to add a column in my query with this type of feature or something along those lines?! -- DrewBe Hi, people usually do this sort of thing with 2 forms. The first form allows a user to choose which record they want to edit. After they choose the record there will be a button to click or sometimes a double click which opens the second form with only the re...

Calculating relative record numbers
The following SQL selects 8 records from a table [Judges]. SELECT Judges.[Judge ID], Judges.[Contest ID] FROM Judges WHERE (((Judges.[Contest ID])=30)); I want to add a column that will also display the relative record number as shown below. 78 12 1 23 12 2 44 12 3 53 12 4 and so on. Adding the additional column is not the problem: how to calculate or devise the relative number is the problem any and all help is appreciated Steve S wrote: >The following SQL selects 8 records from a table [Judges]. > >SELECT Judges.[Judge ID], Judges.[Contest ID] >FROM Judges >WHERE ((...