473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Creating a time limited form

I need to create a time limited form, here is an example:
In a table (Time_To_Show) I have stored the foloving info:
Form show from: 23.12.2007
Form Show to: 01.01.2008

I need to write a code that displays this form (Time_To_Show_Form) between this two dates.
How would I achieve this?

Thanks for any help with this.
May 20 '07 #1
5 1288
missinglinq
3,532 Expert 2GB
That displays the form where/when? And what do you want to happen after the "expiration" date?
May 21 '07 #2
I would like the form to open when entering one other form, lets say you open the form Orders. If the date is between the ones mentioned above it would open over the other form as a notice. I would connect the code to the happening "on open" in the form Orders

After the date has past (Form Show to: 01.01.2008) this form would not open again until I have changed the dates in the table (Time_To_Show).

It`s a little hard to explain because my english is not that good, but I hope you got it.
May 21 '07 #3
No one that can help?
May 23 '07 #4
jamjar
50
In a table (Time_To_Show) I have stored the foloving info:
Form show from: 23.12.2007
Form Show to: 01.01.2008

I need to write a code that displays this form (Time_To_Show_Form) between this two dates.
How would I achieve this?
You could use DLookup in your On Open event code to check the current date against the dates in your table
Expand|Select|Wrap|Line Numbers
  1. Dim dtStart As Date
  2. Dim dtEnd As Date
  3. dtStart=DLookup("[ Form show from]","Time_To_Show","")
  4.  dtEnd=DLookup("[ Form show to]","Time_To_Show","")
  5. If Date >= dtStart And Date<=dtEnd Then
  6.    DoCmd.OpenForm "Time_To_Show_Form"
  7. End If
  8.  
I think this would work for you ...
If this is a one off, why not just put the dates straight in the code?

James
May 23 '07 #5

I think this would work for you ...

James
Yes it did and thank you for helping out!
Best wishes from the land of the midnight sun.
May 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Matthew Clubb | last post by:
Hi, I need help developing an expanding form I've decided that a use of PHP, Mysql and Javascript is the best platform for creating a selection of database interfaces which I'm trying to build...
7
by: nog | last post by:
What's the best approach to creating many objects of a class? I have in mind using something analogous to a table to hold the data - which is in a form similar to (char name, char address, date...
1
by: Ben | last post by:
Due to problems reading the first thread I started I think I should respond with a new post. I have been only able to read up to the 2nd clarification that I posted. Thanks to all who responded....
3
by: Simon Jefferies | last post by:
Hello, I'm trying to create a timer but it doesn't appear to run. I've tried adding one to the aspx form and coding one manually, but the Elapsed event doesn't fire. Any ideas? Regards
3
by: EnglishMan69 | last post by:
Hello All, I am using VB2005 Beta 2 in VS 2005 and am running into a small problem. I need to be able to add a picture box to the main form from within a thread. The program goes to a web...
3
by: DeanL | last post by:
Hi All, I need some help regarding the creation of an auditing facility with Access 97. First off, let me say that the following design is not my idea but I'm in the unfortunate position of...
4
by: DeanL | last post by:
Hi Guys, I need some help creating a query that is going to take between 1 and 10 parameters. The parameters are entered on a form into text boxes that may have data or be empty. Is there a...
2
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.