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

DoCmd.TransferSharePointList not linking all columns
Sharepoint, Licences, Foundation, Enterprise, developer, etc providing dynamic content [closed]
How to have a form load to a certain record from criteria on a Navigation Form in Ms Acccess
Access 2007 reports, hiding fields?
MS Access query increment by one when comparing
ms access - need specific result query from multiple tables [duplicate]
Can I programatically open a new query window?
Access 2013 - query with ConcatRelated containing 50000 entries taking forever
Access Reporting displaying data in report?
MS Access textbox control move other controls while it is growing
“Type Mismatch In Expression”, all data types are the same (Access2013)
How to include date & time from two table into one query or report in access
Group by ID, separate the rest into different columns
Using SetProperty/Dlookup macro to autofill
Access sub form not loaded when using SQL tables
Microsoft Access Website on IIS server 2012 R2

Categories

HOME
sendgrid
keras
reflection
oracle11g
plone
angular-material
fme
yarn
graphql
jpeg
sql-server-2016
disassembler
echarts
datastax-java-driver
networkx
paradox
gitpitch
tomcat6
wheelnav.js
u-sql
google-cloud-ml
zend-framework3
circuit
decomposition
percona
clearcase-ucm
undefined
connection-string
ab-testing
code-review
grails3
immutable.js
cx-freeze
riot.js
format-specifiers
crosstab
buildbot
entitlements
web-api-testing
msys2
primitive
google-cloud-nl
file-rename
http-status-code-503
preg-match-all
ioio
hybridauth
android-kernel
cloud-code
html5-fullscreen
host
http-digest
main
dynamics-crm-2013
occlusion
vapor
ssjs
uft-api
email-templates
grid.mvc
janrain
xml-documentation
chain-builder
ionicons
brightcove
colorama
carrot
feeds
windows-mobile-6.5
namecoin
zendesk-app
spring-cache
angular-strap
word-vba-mac
firmata
color-picker
angular-cache
android-textview
elements
mikroc
py2app
player
lttng
hover-over
php-internals
endeca-workbench
feedback
kcachegrind
cakephp-3.1
appfabric-cache
createprocessasuser
cisco-ios
census
composite
oberon
csquery
code-access-security
android-radiobutton
aapt
rebol3
valuechangelistener
stxxl
fmod
gnu-smalltalk
access-rights
flash-builder4.5
file-locking
rabl
pvrtc
mhtml
hamiltonian-cycle
isnullorempty
cisco-jtapi
getmessage
reddot
bigcouch
eclipse-templates
mercurial-server
gnustep
nsobject
subgurim-maps
blackberry-playbook
psi
django-tagging
self-extracting
android-sdk-2.1
xfbml
lpeg
radcombobox
phonon
noscript
project-hosting

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App