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 
ComboBox Retrieve Dirty Data
David Harnett 
    
5 years ago
Hi, I have a combo box that requires data from previously entered data in the same record. I am using this data as selection criteria in the SQL for the Combo Box, in order to reduce the number of selections. How can I use the data from the dirty record?
Scott Axton  @Reply  
        
5 years ago
Lets assume you have SearchCrit as a text box on your form.


Private Sub SearchCrit_AfterUpdate()
Dim x As String
x = Screen.ActiveControl.Value
MsgBox x
End Sub

------

Instead of MsgBox put x in your SQL
Scott Axton  @Reply  
        
5 years ago
David -
I just realized I may have just steered you in the wrong direction.

  First the scope of the variable x is Private so it will "be lost" once you move on to the SQL for the Combo.  
I suppose you could make it a Public Sub.  BUT...  That brings me to the next issue.

I just noticed that you have started the Expert series and this isn't covered until the Developer 25 course.  I don't know if you even have any experience with VBA.

So...  Scratch that and let me think a little more on how to bet guide you.  My apologies.
Scott Axton  @Reply  
        
5 years ago
typo - best guide you not bet
Scott Axton  @Reply  
        
5 years ago
Can you give me an example and / or post a screen shot of what you are wanting to do?
You can upload a picture by clicking the Upload Images in the top right of your original post.
David Harnett OP  @Reply  
    
5 years ago
I have done a bit of VBA in excell, so I know the basics.
David Harnett OP  @Reply  
    
5 years ago

David Harnett OP  @Reply  
    
5 years ago
If you have a look at the table relationships, I have aircraft make and model tables, then an aircraft register table. In a form based on the register table I am creating a new record (or editing an existing record). I select the aircraft make from a combobox based on the ACMakeT. Then I select the aircraft model from another combobox based on the selection of the first combobox and giving a selection from ACModel in ACModelT. I can get the first combo box to work, but not the second.
Scott Axton  @Reply  
        
5 years ago
Boy I was sure trying to overthink that one.  LOL
I really missed the point of the original question.  Sorry.

The Cascading video should help you get this going.  If,  after watching that and playing a bit, come on back.  and we'll troubleshoot it.
Richard Rost  @Reply  
          
5 years ago
A dirty record is one that hasn't been saved to the table yet. As long as you haven't committed the changes (moved off the record or refreshed) then you should just be able to hit ESCape and get the old (previous) data back.

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 7:56:32 PM. PLT: 1s