Computer Learning Zone CLZ Access Excel Word Windows

Life would be tragic if it weren't funny.

-Stephen Hawking
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Asset Management Seminar Part 1    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Question from Asset Part 1
Nathan Schmidt 
    
5 years ago
I've been playing around with the template from this seminar and came across a few things that left me wondering. (forgive me if this is a simple VBA line as I'm only familiar with VBA and not advanced in that language.)
1. Is there a way to refresh the current record when you change the parent asset? In your example you made the child assets Owner and Location fields hidden when assigned to a parent. I wanted to see if there was a way to refresh the record so that those fields return when the child is removed from the parent. I've tried many things in VBA and cant seem to get those fields to refresh unless I move to the next record or requery the entire form. I know that a requery also sends you back to record 1 so if that is the only way to see updates in the record as you change them, is there a way to have access return you to the record you were on after the requery?
2.If you do assign a child asset record to a parent, is there a way to force the location and owner to change to the parents location and owner? Then on the flip side, if you remove that parent from the child, can you set the values back to 0 until a new location is provided?
Adam Schwanz  @Reply  
           
5 years ago
I'm not familiar with this seminar or what you have going on exactly, so I'm just shooting in the dark here

#1 doesn't a simple me.refresh work for this? Again I don't know how you're doing things but you could just include it in the code that removes the child, or if you're pushing a button to go to a new form to make the changes, putting it on the ongotfocus event.

#2 not sure how you're doing it, but if you were to add children in say a subform of the parent, you could just add to the code that location=Forms!ParentF!location kind of thing, and when removing it, do the same thing but manually location="" or 0 whatever you want to put. You could also do this with DLookup if you weren't on the parent form.

If I'm way off, can you upload an image with the upload images button near the top right of your post? That would probably help clear things up.
Nathan Schmidt OP  @Reply  
    
5 years ago

Nathan Schmidt OP  @Reply  
    
5 years ago

Nathan Schmidt OP  @Reply  
    
5 years ago
Adam,
The refresh didn't work for me which is why this is so frustrating. I'm also not using buttons in the form just yet. I needed to cut the bottom of the screen off on these photos cause it has information that I'm trying to track specific to my Job but the only way to get to the next record is to use the record selector arrows at the bottom of the form. The asset table includes all assets whether they are subassembly's or the top level asset so i can see all records and then see what is installed in that unit in the sub form. So top level is a rack of some sort where you would then install a server. The rack level is the parent and the server is the child so the rack would show the server in its sub form and the server might show any other asset that it is a parent of in its subform say like a network card. If i was to say Rack 123 got sent out to a site to be installed and the laptop went with it, id like to force that change in location with all assets assigned.
Nathan Schmidt OP  @Reply  
    
5 years ago
The second photo shows that I'm trying to take the child assets location and make it disabled, which is easy, but I cant refresh the location field if I remove that parent asset. It stays disabled until I click to the next asset and then back to the asset I'm working on. If I requery the entire thing I go back to record one and that just wont work for me. Again, sorry I'm asking so much I very much enjoy Access but I'm not very strong in my VBA yet.
Adam Schwanz  @Reply  
           
5 years ago
It's been a long day, so sorry if I need it explained like a 2nd grader,

For the second photo, what about just doing after update event of
If Me.Dirty = True Then Me.Dirty = False
Me.Refresh

Or if it wants to be really stubborn you could try getting around it with an automatic move next and back instantly.

recordset.movenext
recordset.moveprevious

Maybe I've misunderstood what you were asking too, are you basically saying you have potentially a string of parent/children

A----B----C----D

You decide you don't want A there anymore, you want to put E. Are you asking how to then tell B, C, and D it's new location from it's new parent, E?
Nathan Schmidt OP  @Reply  
    
5 years ago
Not a problem at all, I unfortunately understand exactly what that's like especially trying to help folks from a distance without knowing the whole background. So first off thanks!! the If then statement didn't work with the me.refresh but the recordset movement did the trick. The flash of the screen is a little ugly but it solves my issues when a change is made and for that i am REALLY happy. Secondly, yes you are correct about the string of parents and children. I'll try to explain a bit to help give some background. We currently have a program where we have say 600 Equipment racks that can be installed in facilities around the globe. Each of those locations will have racks that will include equipment to which id like to tie to that rack at that location which isnt an issue so far. The problem is with the nature of the equipment, it gets moved around a lot so it will need to be able to be paired to different racks and locations easily.
Nathan Schmidt OP  @Reply  
    
5 years ago
Using the template from this class has made this tremendously easier but i want to make sure the location updates with the assigning of another parent. If the parent was removed then i'd like it to have a zero in the table so i can then make sure i can update the location or retire the asset.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Asset Management Seminar Part 1.
 

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/1/2026 2:17:07 AM. PLT: 0s