how do i change this code to do dates instead if time: - CurrentTime = Format(Time, "hh:mm")
-
If CurrentTime = txtBillTime.Text Then
-
Beep
-
frmAppointment.WindowState = 0 'Restore form
-
End If
lee123
19 2120
Hi!
I think this is the one you looked for
Code: ( text )
1. CurrentDate = Format(Date, "dd-MM-yyyy")
2. If CurrentDate = Format(txtBillD ate.Text,"dd-MM-yyyy") Then
3. Beep
4. frmAppointment. WindowState = 0 'Restore form
5. End If
If the above is not the code you looked for means, Can you please explain clearly.
All the Best
With Regards
Vijay. R
If you want date why passing time ?
Instead of passing time ,you need to pass date.
Debasisdas,
i stumbled on to this code for a project im doing. and the way they did this it only had time. but i wanted something with dates. so when that date hit it would pop up the form (a reminder)
thanks vijaysofist i'll try this and see if it works.
lee123
hey vijaysofist,
i found this code in a book i have because it deals with something i've been trying to do but it only has the time i wanted it for the date. so i can set it and when the date hit it would pop up the message i typed in the form like a reminder the whole code to this is: -
Private Sub cmdSetTime_Click()
-
frmAppointment.WindowState = 1 ('this is to set the form to close to the task bar)
-
Timer1.Enabled = True
-
End Sub
then in the timer i have this: - Private Sub Timer1_Timer()
-
On Error Resume Next
-
CurrentDate = Format(Date, "mm-dd-yy")
-
If CurrentDate = Format(Txtbilldate, "mm-dd-yy") Then
-
Beep
-
frmAppointment.WindowState = 0 'Restore form
-
End If
-
End Sub
I wanted this code to do dates so i can enter in a date so when the date came it would remind me of a task or appointment. but i tried your code and the form doesn't close to the taskbar it keeps popping back up when i try to set the date
lee123
i have posted a reply but it never shows up
hi there i have been posting posts but they don't show up anyway
to vijaysofist,
i have tried your code but it doesn't work the whole code i have in my form is this. in the button to (set the date): -
Private Sub SetDate_Click()
-
On Error Resume Next
-
frmAppointment.WindowState = 1
-
Timer1.Enabled = True 'Start timer
-
End Sub
and for the timer i have this now. -
Private Sub Timer1_Timer()
-
On Error Resume Next
-
CurrentDate = Format(Date, "mm/dd/yy")
-
If CurrentDate = Format(Txtbilldate, "MM/DD/YY") Then
-
Beep
-
Timer1.Enabled = False
-
frmAppointment.WindowState = 0 'Restore form
-
End If
-
End Sub
-
but the whole thing is suppose to be a (reminder form) that pops up when you set the date you want to be reminded of a task or appointment. but i can't get it to work right.
to debasisdas:
to answer your question i found this code in a book i have but it deals with the time only and it's similar to what i wanted to do but with dates i wanted to use this code for the project above. by the way what did you mean by this: - If you want date why passing time ?
-
-
Instead of passing time ,you need to pass date.
lee123
hey vijaysofist,
i found this code in a book i have because it deals with something i've been trying to do but it only has the time i wanted it for the date. so i can set it and when the date hit it would pop up the message i typed in the form like a reminder the whole code to this is: -
Private Sub cmdSetTime_Click()
-
frmAppointment.WindowState = 1 ('this is to set the form to close to the task bar)
-
Timer1.Enabled = True
-
End Sub
then in the timer i have this: - Private Sub Timer1_Timer()
-
On Error Resume Next
-
CurrentDate = Format(Date, "mm-dd-yy")
-
If CurrentDate = Format(Txtbilldate, "mm-dd-yy") Then
-
Beep
-
frmAppointment.WindowState = 0 'Restore form
-
End If
-
End Sub
I wanted this code to do dates so i can enter in a date so when the date came it would remind me of a task or appointment. but i tried your code and the form doesn't close to the taskbar it keeps popping back up when i try to set the date
lee123
Hi!
So you want your form to close to the taskbar! Right.
Please Look back your code. This is because in the cmdSetTime_Clic k() Event - you minimized the Form and then Enabled the Timer - where the timer maximizes the form again.
Use
---------------
frmAppointment. WindowState = 0 'in the cmdSetTime_Clic k() Event
and Use
--------------
frmAppointment. WindowState = 1 'in the Timer1_Timer() Event
Please get back to me, whether it works for you or not.
All the Best
With Regards
Vijay. R
Hi!
Check whether if you are using a text box named Txtbilldate to get the date.
Check it and reply My Friend!
With Regards
Vijay. R
hi
replace line
If CurrentDate = Format(Txtbilld ate, "MM/DD/YY") Then
with following line
If datediff("d",fo rmat(CurrentDat e,"mm/dd/yy") , Format(Txtbilld ate, "MM/DD/YY"))=0 Then
because using CurrentDate = Format(Txtbilld ate, "MM/DD/YY") you are comparing two strings not two dates.
regards
manpreet singh dhillon hoshiarpur
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Eric Linders |
last post by:
Hello,
Today is Thursday, August 18, 2004. I would like to have a variable
that stores the date this coming Sunday (even if today happened to be
Sunday) in YYY-MM-DD format. I also need a variable that will store
the date this past Monday (even if today happens to be Monday) also in
YYY-MM-DD format.
So, the end result is that, for this week (today is 2004-08-18) I
would have the following two variables:
|
by: Tjerk |
last post by:
Hello all,
I have the script below to change an image depending on the date upto
january it worked fine but then it just stopped working does anybody have an
idea how I can make it work again or why it doesn't work?
Thanks in advance
Tjerk
|
by: |
last post by:
I have a script...
-----
<SCRIPT language="JavaScript" type="text/javascript">
<!--
function makeArray() {
for (i = 0; i<makeArray.arguments.length; i++)
this = makeArray.arguments;
}
function makeArray0() {
|
by: nw |
last post by:
Hi,
I previously asked for suggestions on teaching testing in C++. Based
on some of the replies I received I decided that best way to proceed
would be to teach the students how they might write their own unit
test framework, and then in a lab session see if I can get them to
write their own. To give them an example I've created the following
UTF class (with a simple test program following). I would welcome and
suggestions on how anybody...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |