dbTalk Databases Forums  

Dropdown

comp.databases.ms-access comp.databases.ms-access


Discuss Dropdown in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
bsn
 
Posts: n/a

Default Re: Dropdown - 12-24-2011 , 04:14 AM






"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:jd1umk$jsp$1 (AT) speranza (DOT) aioe.org...
Quote:
On 23/12/2011 12:44:12, "Douglas J Steele" wrote:
AFAIK, there's a limit of 32,767 rows (the maximum value of an Integer)
that you can display in a combo box.

"Patrick Finucane" wrote in message
news:177561fc-48c4-4ffe-9cc1-2cd32a2a903b (AT) a17g2000yqj (DOT) googlegroups.com...

On Dec 22, 1:19 am, "bsn" <bsnSNABELAoncableDOTdk> wrote:
"Phil" <p... (AT) stantonfamily (DOT) co.uk> skrev i en
meddelelsenews:jct36q$2em$1 (AT) speranza (DOT) aioe.org...

Still the same problem...:-(
The query contains 140000 records...
U can see the case here :http://hoejbynet.dk/test/test.html
Bjarne

Holy Smoke! You are stuffing 140,000 records into a dropdown? I pity
the end-user.



Surprised that if Douglas is correct that you get as far as "k" which is
about 40% through the alphabet whilest 32767 is less than 25% of the
140,000
records This may help

http://allenbrowne.com/ser-32.html

Phil
I now tried with the code in the link above, and it solwes the problem
partially...
When there is a text in the combo(An Updated record), with startletter after
"k" the sorting are correct...

But when its an empty / new record the combo is empty, even when i type
letters into the combo field(Me.YdelseTekst)
I think u can help me the last way, with this problem
I think im very close to the solution now...

For understanding the code I presume the combo should be filled with
suggestions, when I typed in min. 3 letters,
and it should come with new suggestions when I type more
letters...correct...???

In the top of the subform i got this code:
My code:
Option Compare Database
Option Explicit

Dim sSuburbStub As String
Const conSuburbMin = 3

Function ReloadSuburb(sSuburb As String)
Dim sNewStub As String ' First chars of Suburb.Text

sNewStub = Nz(Left(sSuburb, conSuburbMin), "")
' If first n chars are the same as previously, do nothing.
If sNewStub <> sSuburbStub Then
If Len(sNewStub) < conSuburbMin Then
'Remove the RowSource
'Me.YdelseTekst.RowSource
Form_frmTilbudLinje_uf!YdelseTekst.RowSource = "SELECT
tblYdelse.YdelseTekst, tblYdelse.YdelseID, tblYdelse.YdelsePris," & _
" tblVareGruppe.RabatProcent, tblVareGruppe.AvanceProcent" & _
" FROM tblVareGruppe INNER JOIN tblYdelse ON
tblVareGruppe.VaregruppeID = tblYdelse.VaregruppeID_ WHERE (False);"
sSuburbStub = ""
Else
'New RowSource
'Me.YdelseTekst.RowSource
Form_frmTilbudLinje_uf!YdelseTekst.RowSource = "SELECT
tblYdelse.YdelseTekst, tblYdelse.YdelseID, tblYdelse.YdelsePris," & _
" tblVareGruppe.RabatProcent, tblVareGruppe.AvanceProcent" & _
" FROM tblVareGruppe INNER JOIN tblYdelse ON
tblVareGruppe.VaregruppeID = tblYdelse.VaregruppeID_ WHERE
(tblYdelse.YdelseTekst Like """ & sNewStub & "*"")" & _
" ORDER BY tblYdelse.YdelseTekst;"
sSuburbStub = sNewStub
End If
End If

End Function
/My code:

And in the Current event I got this code:
My code:
Call ReloadSuburb(Nz(Me.YdelseTekst, ""))
/My code:

Bjarne

Reply With Quote
  #22  
Old   
bsn
 
Posts: n/a

Default Re: Dropdown - 12-24-2011 , 05:01 AM






"bsn" <bsnSNABELAoncableDOTdk> skrev i en meddelelse
news:4ef5a610$0$56793$edfadb0f (AT) dtext02 (DOT) news.tele.dk...
Quote:
"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:jd1umk$jsp$1 (AT) speranza (DOT) aioe.org...
On 23/12/2011 12:44:12, "Douglas J Steele" wrote:
AFAIK, there's a limit of 32,767 rows (the maximum value of an Integer)
that you can display in a combo box.

"Patrick Finucane" wrote in message
news:177561fc-48c4-4ffe-9cc1-2cd32a2a903b (AT) a17g2000yqj (DOT) googlegroups.com...

On Dec 22, 1:19 am, "bsn" <bsnSNABELAoncableDOTdk> wrote:
"Phil" <p... (AT) stantonfamily (DOT) co.uk> skrev i en
meddelelsenews:jct36q$2em$1 (AT) speranza (DOT) aioe.org...

Still the same problem...:-(
The query contains 140000 records...
U can see the case here :http://hoejbynet.dk/test/test.html
Bjarne

Holy Smoke! You are stuffing 140,000 records into a dropdown? I pity
the end-user.



Surprised that if Douglas is correct that you get as far as "k" which is
about 40% through the alphabet whilest 32767 is less than 25% of the
140,000
records This may help

http://allenbrowne.com/ser-32.html

Phil

I now tried with the code in the link above, and it solwes the problem
partially...
When there is a text in the combo(An Updated record), with startletter
after "k" the sorting are correct...

But when its an empty / new record the combo is empty, even when i type
letters into the combo field(Me.YdelseTekst)
I think u can help me the last way, with this problem
I think im very close to the solution now...

For understanding the code I presume the combo should be filled with
suggestions, when I typed in min. 3 letters,
and it should come with new suggestions when I type more
letters...correct...???

In the top of the subform i got this code:
My code:
Option Compare Database
Option Explicit

Dim sSuburbStub As String
Const conSuburbMin = 3

Function ReloadSuburb(sSuburb As String)
Dim sNewStub As String ' First chars of Suburb.Text

sNewStub = Nz(Left(sSuburb, conSuburbMin), "")
' If first n chars are the same as previously, do nothing.
If sNewStub <> sSuburbStub Then
If Len(sNewStub) < conSuburbMin Then
'Remove the RowSource
'Me.YdelseTekst.RowSource
Form_frmTilbudLinje_uf!YdelseTekst.RowSource = "SELECT
tblYdelse.YdelseTekst, tblYdelse.YdelseID, tblYdelse.YdelsePris," & _
" tblVareGruppe.RabatProcent, tblVareGruppe.AvanceProcent" & _
" FROM tblVareGruppe INNER JOIN tblYdelse ON
tblVareGruppe.VaregruppeID = tblYdelse.VaregruppeID_ WHERE (False);"
sSuburbStub = ""
Else
'New RowSource
'Me.YdelseTekst.RowSource
Form_frmTilbudLinje_uf!YdelseTekst.RowSource = "SELECT
tblYdelse.YdelseTekst, tblYdelse.YdelseID, tblYdelse.YdelsePris," & _
" tblVareGruppe.RabatProcent, tblVareGruppe.AvanceProcent" & _
" FROM tblVareGruppe INNER JOIN tblYdelse ON
tblVareGruppe.VaregruppeID = tblYdelse.VaregruppeID_ WHERE
(tblYdelse.YdelseTekst Like """ & sNewStub & "*"")" & _
" ORDER BY tblYdelse.YdelseTekst;"
sSuburbStub = sNewStub
End If
End If

End Function
/My code:

And in the Current event I got this code:
My code:
Call ReloadSuburb(Nz(Me.YdelseTekst, ""))
/My code:

Bjarne
Solved - i forgot the Change event...:-((
Thx for helping - much apreciated...
Bjarne

Reply With Quote
  #23  
Old   
Access Developer
 
Posts: n/a

Default Re: Dropdown - 12-24-2011 , 11:25 AM



Statistical conclusions don't necessarily apply to real-world data...
real-world data might have only a single record prior to "k" in the sort
order (not accusing your data of being that skewed, but it could be). I've
worked on (someone else's) database application where every item of a Combo
Box dropdown began with the same identical character.

Fortunately, they were not trying to exceed the limits of either Access nor
human perception.

Regardless of your statistical conclusion, a scrollable dropdown, even with
AutoExpand enabled, anywhere near 32k (much less 140000) is going to have
"incredibly ucky" (highly technical term) performance and the user's company
better arrange a quantity discount for their users at a nearby "looney bin".

--
Larry

"bsn" <bsnSNABELAoncableDOTdk> wrote

Quote:
see answer to Phil...
Bjarne

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.