Solved

Fill a combo Slider field based on a value entered by user

Posted on 2016-09-11
3
52 Views
Last Modified: 2016-09-11
I have a combo field (cmbProduct) which I would like to fill with values from table SHOPITEMS matching a string entered by the user in field xSearch.  For example if the user enters  pants - the system should read table SHOPITEMS and fill cmbProduct slider with all products matching  *pants*.  Thank you for any help... Michael
0
Comment
Question by:mpim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 41793554
You can set the RowSource of your combo to do that:

Me.YourCombo.RowSource = "SELECT Field1 FROM ShopItems WHERE SomeField LIKE '*" & Me.txSearch & "*"
0
 

Author Comment

by:mpim
ID: 41793561
Great - however I get a syntax error in the Query. The error msg is !Syntax error in string in query expression '[SHOPITEMS].[PRODUCT] LIKE '*panera*'

I used the following code in the Lost Focus Event:
Me.cmbPrd1.RowSource = "SELECT [SHOPITEMS].[PRODUCT] FROM [SHOPITEMS] WHERE [SHOPITEMS].[PRODUCT] LIKE '*" & Me.xSearch & "*"

Thank you so much for your help..
0
 

Author Comment

by:mpim
ID: 41793562
Sorry... I found the error there was a ' missing. Works perfectly... Thank you!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question