Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Developers
Back to Access Developer Forum    Comments List
Using A Date across Forms Upload Images   Link   Email  
Gary Simpson      
2 months ago
How do I use a specific Date Across all forms Where I use week numbers. I Have A Table Called ("CompanyDetailsT") and in this Table, I have Field called ("DateFinancialYearStarts"). How or what is the best way to Reference this field from ("CompanyDetailsT"),("DateFinancialYearStarts") when a new record is added or when a form is loaded.
kind Regards Gary
Sami Shamma             
2 months ago
Hi Gary,

There are a couple of ways you can do that depending on the design of your forms.

Method 1:
If you have a main menu that is bound to your CompanyDetailsT, then you can put DateFinancialYearStarts on that form, visible or hidden. Then reference it from other forms by making the reference that "date" Row Source =Forms!MainMenu!DateFinancialYearStarts.

Method 2:
On opening your first form when you start Access, store that value from the CompanyDetailsT in a TempVars as follows:

TempVars("FDate") = DLookup("DateFinancialYearStarts","CompanyDetailsT") assuming you have only one record in the CompanyDetailsT.
Now you assign the TempVars("FDate") to your fields in the different forms.
Gary Simpson      
2 months ago
Hi Sami Shamma Thank you for getting back to me, On my first Form I call Main Menu, And Does not Not have Any fields in it, It's only buttons to open other forms. So where would I assign the TempVars(2FDate") on my main form?
Richard Rost             
2 months ago
Gary, I see you've only completed Access Beginner 1 thru 6. Is that your skill level? If so, we'll try to put together a solution that matches your skill level. Sami's methods are both perfectly correct, you just might need some additional explaining. I'd recommend his Method 1 for you. It's the easiest to implement. Value From a Form
Sami Shamma             
2 months ago
Gary, take Richard's advice.

Bind your Main menu to your CompanyDetailsT table.
Place the field DateFinancialYearStarts on the form. If you do not want users to see it, change its Format property "visible" to no.
Now you can use method 1.
Richard Rost             
2 months ago
If this is a value that doesn't change often (like once a year) you could make it an unbound field, not bind the form to the table, and just set is as the default value of that field. When you do need to change it, you'll have to make a design change, but that should only be once a year. Up to you. This might make for a good video. I'll add it to the list. :)
Gary Simpson      
2 months ago
Hi Richard, I have Dabbled in Visual Basic using SQL Databases. But I had a stroke and it is trying to remember how to do things. So I found your Video's on YouTube, So I bought Office 2021 Pro From Amazon. And started using Access. But I did find the VBA coding is Different to Visual Basic Coding. So I am trying to re-learn using VBA Coding. Yes I am watching your Access beginner Over and over to try and get things into my head and once I have mastered all 6 Lessons I will be purchasing more Levels.
Kind Regards Gary
Sami Shamma             
2 months ago
Best of luck with your recovery. It is amazing what the brain can learn and relearn.
Sami Shamma             
2 months ago
Thank you Gary

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/20/2024 10:25:40 PM. PLT: 0s
xxx