A
Anthony Headley
Morning/Afternoon Evening all,
I have an odd issue that maybe someone here could help me out with. Please
excuse if this is in the wrong group.
So, I have an ADP connected to a SQLExpress Server and performance is
quite good but I am having some issues selecting some Items from Combo
Boxes.
My issue is as follows:
I have a combo box that is part of a subform that has it?s rowsource =
"SELECT TOP 100 PERCENT EquipmentID, PieceNr FROM Table_Equipment ORDER BY
PieceNr"
This returnes about 1000 items that look about like this:
35 LY*101CA
35 LY*101DV
1 ML*101AM
2 ML*101DV
344 ML*101XX
....
The combo box is correctly configured to bind to the first column and show
only the second, and it box works great as long as I select the item from
the dropdown list (F4) or use the mouse. However, as soon as I paste, or
type, a value that I know is in the list the NotInList event fires; even
though I can select the item from the dropdown box.
I have even tried creating a progressive an OnKeyPress Query to narrow
down the choices in case 1000 items was too much, but even after the list
is narrowed down to 1 item it still fires the NotInList Event if I press
{Arrow Down}, {Arrow Left}, {Tab}, or {Enter}.
So then, as a work around I created this event:
~snip~
Private Sub Piece_Nr_NotInList(NewData As String, Response As Integer)
Me.Piece_Nr.RowSource = "SELECT EquipmentID, PieceNr FROM
Table_Equipment WHERE PieceNr = '" & NewData & "'"
If Me.Piece_Nr.ListCount > 0 Then
Me.Piece_Nr.ListIndex = 0 ?this seems to be the only way to have
the item selected
Response = acDataErrAdded ?this does not seem to requery the
control as stated in help.
Else
Response = acDataErrDisplay
End If
End Sub
~snip~
This works, kind of but leaves me with the dropdown extended and I have to
press enter twice before the value is taken.
Personally I think it because the values that I?m looking up contains a
?*?. It seems that as soon as I type the ?*? the Auto Expand function
stops expanding and the list is reset back to the beginning. I also also
tried looking other values like ?Test?, ?This?, ?DxxxxWork!? and they are
all ok type typing and pasting.
This is the first time I am experiencing this issue since this database
was at one time in its life a MDB. Also I have already tried LIKE %
queries but that did not help my workaround.
Any ideas would be super useful.
Thanks , And sorry again if this is the wrong group.
Anthony
I have an odd issue that maybe someone here could help me out with. Please
excuse if this is in the wrong group.
So, I have an ADP connected to a SQLExpress Server and performance is
quite good but I am having some issues selecting some Items from Combo
Boxes.
My issue is as follows:
I have a combo box that is part of a subform that has it?s rowsource =
"SELECT TOP 100 PERCENT EquipmentID, PieceNr FROM Table_Equipment ORDER BY
PieceNr"
This returnes about 1000 items that look about like this:
35 LY*101CA
35 LY*101DV
1 ML*101AM
2 ML*101DV
344 ML*101XX
....
The combo box is correctly configured to bind to the first column and show
only the second, and it box works great as long as I select the item from
the dropdown list (F4) or use the mouse. However, as soon as I paste, or
type, a value that I know is in the list the NotInList event fires; even
though I can select the item from the dropdown box.
I have even tried creating a progressive an OnKeyPress Query to narrow
down the choices in case 1000 items was too much, but even after the list
is narrowed down to 1 item it still fires the NotInList Event if I press
{Arrow Down}, {Arrow Left}, {Tab}, or {Enter}.
So then, as a work around I created this event:
~snip~
Private Sub Piece_Nr_NotInList(NewData As String, Response As Integer)
Me.Piece_Nr.RowSource = "SELECT EquipmentID, PieceNr FROM
Table_Equipment WHERE PieceNr = '" & NewData & "'"
If Me.Piece_Nr.ListCount > 0 Then
Me.Piece_Nr.ListIndex = 0 ?this seems to be the only way to have
the item selected
Response = acDataErrAdded ?this does not seem to requery the
control as stated in help.
Else
Response = acDataErrDisplay
End If
End Sub
~snip~
This works, kind of but leaves me with the dropdown extended and I have to
press enter twice before the value is taken.
Personally I think it because the values that I?m looking up contains a
?*?. It seems that as soon as I type the ?*? the Auto Expand function
stops expanding and the list is reset back to the beginning. I also also
tried looking other values like ?Test?, ?This?, ?DxxxxWork!? and they are
all ok type typing and pasting.
This is the first time I am experiencing this issue since this database
was at one time in its life a MDB. Also I have already tried LIKE %
queries but that did not help my workaround.
Any ideas would be super useful.
Thanks , And sorry again if this is the wrong group.
Anthony