Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Search Form
Launa Sallai 
     
3 years ago
I have two questions
1.  I created a search form with a search query and 4 searchable columns and display the results in a list box.  I enabled the headers but I would like to change them(alias them) and I know you can do this, but have been unsuccessful.

2.  For one of the searches I am searching a value of 4339.  and used Richards criteria from his video Like "*" & [Forms]![WorkOrderSearch]![txtModel] & "*" Or Is Null, and it grabs all rows with numbers like 90064339 or 90143391, BUT does not select the row with just 4339.  I tried adding this: =[Forms]![WorkOrderSearch]![txtSerialNumber] but that didnt work either.

Any help would be appreciated
Launa
Launa Sallai OP  @Reply  
     
3 years ago

Launa Sallai OP  @Reply  
     
3 years ago
These are the headings I want to change.
Kevin Robertson  @Reply  
          
3 years ago
Hi Launa,

You can alias your Column Headers at the Table level by using the Caption property.
Dan Jackson  @Reply  
            
3 years ago
You have [txtModel] and then [txtSerialNumber] in the later example. Are you referencing the right field?
Launa Sallai OP  @Reply  
     
3 years ago
Not sure how to reply directly to Kevin... The table is aliased at the table level Kevin.  But in the Query they are coming in differently.
Launa Sallai OP  @Reply  
     
3 years ago
Dan, I posted the wrong code.  Should be
AND ((Products.Serial)=[Forms]![WorkOrderSearch]![txtSerialNumber]))
OR (((Products.Serial) Like "*" & [Forms]![WorkOrderSearch]![txtSerialNumber] & "*" Or (Products.Serial) Is Null));
Launa Sallai OP  @Reply  
     
3 years ago

Launa Sallai OP  @Reply  
     
3 years ago

Launa Sallai OP  @Reply  
     
3 years ago
according to the MS article the RowSourceType property sets the headings in the list box.  And this is what I have in that property, but its not working as written.
SELECT [WorkOrderSearchQ].[ProductID], [WorkOrderSearchQ].[CatagoryName] as Category, [WorkOrderSearchQ].[DateIn], [WorkOrderSearchQ].[FirstName] as Name, [WorkOrderSearchQ].[Model], [WorkOrderSearchQ].[Serial], [WorkOrderSearchQ].[RepairDate] FROM [WorkOrderSearchQ] ORDER BY [ProductID];
Kevin Robertson  @Reply  
          
3 years ago
Your SQL statement should be in the Row Source of the List Box and since you are getting your data from a Query the Row Source Type should be set to Table/Query.
Launa Sallai OP  @Reply  
     
3 years ago
Thats correct Kevin, that is how it is set up.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 5:21:34 AM. PLT: 1s