Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Search As You Type < Combo Box | Import Access >
Back to Search As You Type    Comments List
Upload Images   Link   Email  
ID numbers
Monica Jones 
        
17 months ago
Ive hit a snag. Im building a database for my craft projects and supplies for each vs what I have on hand. My form for projects has project type (eg bracelet, pen cover) and Designer both of which I have in my HelperT.  SearchBox works great for ProjectName which is freeform, but for the other two I have to know the ID# and thats not happening. Any workarounds?
Kevin Robertson 
          
17 months ago
Build a query to bring all the fields together from each of the tables and base your form off of that query. Now you will have a text value to search on instead of the ID.

Remember to also change the object name in your code from the table to the query.
Scott Axton 
          
17 months ago
Please provide additional information.  It's difficult to advise how to proceed when we don't know what you have done.

A screen shot or two and the code you are using goes a long way.
Monica Jones OP 
        
17 months ago
I'm pulling directly from a table. One of my professors in college claimed that basing forms on queries made them more agile so I used to go overboard. Learning there's a cleaner way of doing things I've been an eager(perhaps over eager) convert. Here's my code:
Private Sub SearchBox_Change()
    Me.RecordSource = "SELECT * FROM DelicaProjectT " & _
        "WHERE " & _
            "BeadTypeID LIKE ""*" & SearchBox.Text & "*"" OR " & _
            "ProjectTypeID LIKE ""*" & SearchBox.Text & "*"" OR " & _
            "ProjectName LIKE ""*" & SearchBox.Text & "*"" OR " & _
            "DesignerID LIKE ""*" & SearchBox.Text & "*"""
    SearchBox.SetFocus
    SearchBox.SelStart = Len(SearchBox.Text)
End Sub
Monica Jones OP 
        
17 months ago
Kevin, I tried building a query but I couldn't wrap my head around how to convert the ID numbers to text inside a query. If you could expand on that it may well solve a difficulty I have with a completely different database. I may be trying to build to much at once, is that possible, lol?
Kevin Robertson 
          
17 months ago
Here is a sample query showing the text field to search on added to the query. The 2 tables are joined by the ID.

Kevin Robertson 
          
17 months ago

Monica Jones OP 
        
17 months ago
Got the query! I've linked my form to it, and now my SearchBox kicks back an "Enter Parameter Value", even when I copy paste them from the query. When I click debug it highlights from me.recordsource all the way thru the last or statement. Here's my code:

Private Sub SearchBox_Change()
    Me.RecordSource = "SELECT * FROM DelicaProjectT " & _
        "WHERE " & _
            "BeadType LIKE ""*" & SearchBox.Text & "*"" OR " & _
            "ProjectType LIKE ""*" & SearchBox.Text & "*"" OR " & _
            "ProjectName LIKE ""*" & SearchBox.Text & "*"" OR " & _
            "Designer LIKE ""*" & SearchBox.Text & "*"""
    SearchBox.SetFocus
    SearchBox.SelStart = Len(SearchBox.Text)
End Sub
Richard Rost 
            
17 months ago
Enter parameter value... what? What field is it looking for. Usually a misspelling. Enter Parameter Value
Kevin Robertson 
          
17 months ago
You need to change from DelicaProjectT to the name of your query.
I also forgot this step when I tested it and got the same error.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Search As You Type.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 12/13/2024 5:20:54 PM. PLT: 1s