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 
Using TempVars for Data
David Sovis 
   
2 years ago
Richard/Team,

I have a Specialist Table, A Student Table and a Crossover Table that aids in tracking tutoring sessions (many-many) where each specialists can have several students and vice-versa. I am tracking each tutor session and drive a form that selects the Specialist and the Student in 2 seperate combo boxes with inputs for hours, subject and feedback then calculates sessions costs. Once this form is complete, I have  second form that is used for approvals. This form opens with the relevant information from the first form with all the aforementioned information and provides checkboxes and dates for Approvals.

All works spot-on as long as I use the two comboboxes to select Specialis/Student and the data carries over to the 2nd form properly for approvals and report printing.

But the to combo box selection is for Admin use only. When the Specialist logs on, they need only see their own info and the forms should populate with their info "automatically"

My intent:

Specialist's Input(problem form): Specialists logon and fill out their session reporting form. They would select student but not have to select themselves and the form/table would fill with their information only

Admin Input (current working form): Admin logs on selects Specialist and then student as well as hours, feedback, etc.

My issue is that I need to restrict the Specialist from seeing other Specialists names and information and want the Table/Forms/Reports to input their information "automatically" based upon their logon. So, I have TempVars setup at logon that specify whom is logged on using the architecture of your User Security (I believe from User Security Video #2). This works fine and I can reference the TempVars throughout the forms.

BUT I cannot set the Specialist's ID (UserID) or name in the form or table using the TempVars so that it will show-up in the record for that session in the table,subsequent Forms and Reports it is blank if I don't use the combobox. How do I set the value of the Specialist's ID (UserID) so that subsequent forms and reports will associate the Specialist's ID (UserID) with the relevant session? What am I missing? I have tried DLookup, placing the TempVars reference in OnLoad, OnOpen, etc. I am not getting it...The forest seems to be deep and I'm not seeing the trees...
Richard Rost  @Reply  
          
2 years ago
I cover how to control "who sees what" in your database in my Security Seminar. Lots of time is spent on this.
David Sovis OP  @Reply  
   
2 years ago
I totally appreciate this and use your logon technique to assign the Tempvars. The Tempvars is recallable and show in the form. The issue I am having is that if I substitute the Tempvars for the combo box and the textbox is named SpecisialistId, or use DLookup the box goes blank once I leave the form. nothing is saved in the tables. So when I reference this session in subsequent forms and events, the Specialist's ID and information is gone...how do I fix? Am I supposed to input the Tempvars value into the Table somehow?
Richard Rost  @Reply  
          
2 years ago
You'll have to check to make sure they have a value before saving the record. Remember, just putting something in the Default Value doesn't assign that value to the record. Same problem if you have an order form with a CustomerCombo box at the top. Until there's a parent record assigned (maybe by entering in any other piece of data) then that combo box still has no value.
Richard Rost  @Reply  
          
2 years ago
David Sovis OP  @Reply  
   
2 years ago
Thank you Richard! I got it! You are the man!

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/30/2026 8:14:38 AM. PLT: 0s