ms-access


Access combo box dropdown rowsource sql on change not working mystery


MS Access 2010. Have Order form with master-child related OrderDetails subform. OrderDetails is DataSheet view. Have combo box for the OrderDetails subform Product field. Product field is bound to ProductID but user sees Product name.
Have Change Event for Product combo box that changes combo box RowSource to sql results:
strSql = "SELECT ProductID, ProductName From Products " & _
"WHERE ProductName Like ""*" & Me.cboNewProduct.Text & "*"";"
'set combo box rowsource
Me.cboNewProduct.RowSource = strSql
'drop list down
Me.cboNewProduct.Dropdown
This works fine for the first record. Upon entering first letter, drop down shows with only Products with that letter, and continues beautifully as user continues to enter letters. The user can stop and select from properly filtered drop down list at any point and the selected Product is successfully entered and saved.
However, when moving to the subsequent records it doesn't work. The drop down shows but only with results of the first letter entered and seems to 'freeze'. It doesn't continue to filter list. Its like the RowSource is not taking hold on subsequent letter entries.
Also, very weird, if you enter the full string for a Product, the list still stays 'frozen' with static list, but selecting the first record regardless of its value actually does enter the intended product. Eg the filter does appear to be working but the form is not reflecting these changes!
Manually selecting the drop down to close and reopen it does clear the 'frozen' values and show only the closest matches.
I know the sql string is changing from debug.print.
Me.cboNewProduct.Requery won't help because it requires the record be saved, and can't be saved, because only partial letters are being entered that do not match any product.
I have tried to move focus to another field on that record and back to Product field to emulate manually selecting drop down to 'clear' it but doesn't help.
Its a very weird issue. Too bad there is no on/off for DropDown in VBA.
Any ideas? I am stumped.

Related Links

Combine rows / concatenate rows
Can I add a user to Access with VBA, instead of using the builtin User and Group Account box?
MS Access MDE on Terminal Server
Determining whether an object is a member of a collection in VBA
How to insert a column description into an Access table?
Performance degredation after splitting an Access DB
checked fields in creating a query
Performance issues regarding Access 2003 and the OLE Object data type
how do you view macro code in access?
Is there a way to get ms-access to display images from external files
How can I modify a saved Microsoft Access 2007 or 2010 Import Specification?
Different odd/even pages in MS Access reports
How to control user rights to an Access database?
What will we do after Access? [closed]
SSRS Report Builder - Issues From Experience?
Remove Authentication From Microsoft Access

Categories

HOME
vim
winforms
multithreading
vbscript
netsuite
c#-4.0
fluentd
homebrew
relayjs
grep
cplex
yarn
microservices
disassembler
azure-storage-tables
constraint-programming
portia
dacpac
mapserver
timeout
jplayer
commonmark
undefined
viewport
lldb
paging
cx-freeze
sox
tibco-mdm
captiveportal
facet
traffic
tooltipster
web-api-testing
strncpy
msys2
flink-streaming
fabric8
react-chartjs
galsim
titanium-mobile
siesta-swift
mmenu
suricata
simplexml
service-discovery
uft-api
dism
optix
fakeiteasy
flashair
skeleton-css-boilerplate
clean-architecture
return-value
jxcore
nodebb
snmptrapd
sybase-asa
namecoin
mako
lync-client-sdk
background-service
specrun
firmata
instant
savon
sts-springsourcetoolsuite
elements
google-web-starter-kit
paypal-express
gstreamer-0.10
contact-list
jwplayer7
reactive-banana
google-places
0xdbe
sankey-diagram
inmobi
facebook-graph-api-v2.4
ng-animate
camanjs
code-access-security
concurrent-collections
dotnetnuke-5
ril
file-locking
jplaton
dataadapter
cascalog
bubble-chart
jquery-ui-layout
pendrive
work-stealing
nsdatecomponents
f#-powerpack
invite
mongomapper
gallio
pascal-fc
gacutil

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App