![]() | |
#21
| |||
| |||
|
|
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 |
#22
| |||
| |||
|
|
"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 |
#23
| |||
| |||
|
|
see answer to Phil... Bjarne |
![]() |
| Thread Tools | |
| Display Modes | |
| |