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 
Insert the result of a query
Colin Smyth 
      
5 years ago
I have a form which uses the browse button to select the location of a photo on my hard drive and adds it to the form to show the photo. I have set up a query using Right([fieldname],12) to select the last 12 letters of the path to my photo which gives me the actual photo ID eg P2020200.jpg. The query works but how do I then place that result into another field on my form?
Scott Axton  @Reply  
        
5 years ago
Are you are just displaying the file name on the form in an unbound text box or storing that value in a field in your table?

Just a suggestion - You might want to reconsider pulling just the last 12 characters.  That has the potential of creating bad data.  For instance what if you have a shorter file name? Or longer?

I can't remember if Richard covered InStrRev in the String Functions video or not.  I know it is covered in Expert 25.
Also do a search for "Get filename".
Colin Smyth OP  @Reply  
      
5 years ago
It doesn't have to be stored in the database although it currently is but manually entered which is what I was trying to avoid having to do.
I had noticed that sometimes the string was occasionally longer than 12, although most are OK and I would just manually change some if that was a real issue.
I don't remember the InstrRev in the string functions video. I will also do a search for "Get Filename"
Thank you for your advice.
Colin Smyth OP  @Reply  
      
5 years ago
So if I just want to display it in the field on the form and not in the database, how could I achieve that?
Richard Rost  @Reply  
          
5 years ago
See the extended cut for Images
Colin Smyth OP  @Reply  
      
5 years ago

Colin Smyth OP  @Reply  
      
5 years ago
I trust you can read the above - any help would be appreciated.
Adam Schwanz  @Reply  
           
5 years ago
What do you mean by "automatically" fills in bird name/id? Like when you create a new record in the subform? If so you just need to set the default value on those fields to your Form where the information is, like Forms!FormName!BirdName
Adam Schwanz  @Reply  
           
5 years ago
Colin Smyth OP  @Reply  
      
5 years ago
Thank you - that has resolved my issue.

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/9/2026 11:28:29 PM. PLT: 0s