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 
Textbox question
Mark Budinger 
     
2 years ago
I have this form called "Shop_Inventory", inside this form I have a text box with a control source of =[Forms]![frmQCInspections]![cboPart]

I have made many copies of this form and in each of those text boxes I have a different form and filed listed. Instead of creating so many copies of the same form, is there a way or some sort of code that will just open one form and that text box displays the field of the last form I have opened?

Regards,
Mark
Adam Schwanz  @Reply  
           
2 years ago
Not sure completely waht you're asking, but you can set the value when you open the form

DoCmd.OpenForm "[Shop_Inventory]"
Forms![Shop_Inventory]!Textbox=cboPart


If you need to determine which form you're starting on, you could use .IsLoaded or something like this

If Me.Name="MainF" Then
'stuff
Else if Me.Name="OtherF" Then
'Stuff
'etc
End If
Mark Budinger OP  @Reply  
     
2 years ago
I have a few type of Inspection forms. When I am working on a certain part number and then I press the "Shop Inventory" Command button. I would like it to fill the text box in with the correct part number from the inspection form. Right now I just made a bunch of copies of the Shop Inventory form and changed the control source to each text box on the shop inventory form to point to the part number of the form I pressed the command button of.

I hope this makes more sense.
Adam Schwanz  @Reply  
           
2 years ago
So yea, if you are on any form with the cboPart in it, and you open the shop inventory form from there, this kind of code would set your textbox correctly.

DoCmd.OpenForm "[Shop_Inventory]"
Forms![Shop_Inventory]!Textbox=cboPart
Mark Budinger OP  @Reply  
     
2 years ago
Hi Adam,

Thank you. I did as you suggested and all is working well. I now just have one form to use.

Regards,
Mark

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: 6/14/2026 8:51:28 AM. PLT: 0s