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 
User Name Update After Make Changes in Subform
Abusofian Khokon 
    
11 months ago
Hi Sir,
I kept tempvars("User") in my mainform which works fine, but when i make edit in the sudform then tempvars doesn't work which is in the mainform.
could you please advise how to solve it out?

Best Regards,
AbuSofian
Juan Rivera  @Reply  
            
11 months ago
Need more info can you show your code and maybe a snap shot of the form?
Bill Carver  @Reply  
      
11 months ago
One thing that usually happens when people have trouble with tempvars when you're getting a value from a field you would need to use tempvars ("user") = username.value.

Username being the name youre using to set the tempvar
Abusofian Khokon OP  @Reply  
    
11 months ago

Abusofian Khokon OP  @Reply  
    
11 months ago
Thanks Mr. Juan Cavera and Bill Carver for your replies,

Temvars("User") , its okay and working properly if i make any changes in the main form,
but when i make any change in the subform then it doesn't work.
Abusofian Khokon OP  @Reply  
    
11 months ago

Sami Shamma  @Reply  
             
11 months ago
Abusofian you are making your life and the life of those who are trying to help you difficult. As a student on this forum, you must have heard Richard emphasize the importance of code that is legible. Yours is not. Your buttons don't have names.

You do not indent whatsoever. You should write your code so you can read it easier later, as well as anyone else who is trying to help. You use "me." With field names, which is not necessary. It just makes your code more difficult to read.

Post the design view of both your order table and order detail table.


Kevin Robertson  @Reply  
          
11 months ago
Abusofian You need to explicitly declare the type for EACH of your variables.

    Dim variable1 As String, variable2 As String, variable3 As Long
Donald Blackwell  @Reply  
       
11 months ago
Abusofian

The "DataChange" property is not a boolean. It is to specify a macro, event, or function that runs when the form datachange event fires. The main form won't know when the that event fires in the subform unless you have a lot more code that tells it to listen for it.

It might be better to have a public function in your main form that the subform could call in its afterupdate event. This would also help you to clean up your code.

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 12:19:07 PM. PLT: 1s