Searching Date/Time datatype

nicole05

New member
Local time
Today, 06:38
Joined
Feb 2, 2012
Messages
7
Good day,

In my form i have 1 field name "Date Entry" which set to datatype DATE/TIME.
Format: Medium Date (as ex. 02-Feb-12)

I have also "quick search button" that working fine but the only problem i have
if i search according by months there is no value return.

I do have on my database company income and expenses since Sept, 2011 up to the current date. What i want to do, i will search by month like for instance, October i want only all date on October will return.How can i do this? or there is something to add in the Macro Arguments? Thanks.
 
Good day...

I got it. Thanks for advice and the link. It really helps me...
 
As i having hard time finding to put in a new thread, i post it here sir. I want again help from you sir.

I have a Table Which have 5 Columns.
Table Name- Personnel Details
Fields- txtName, txtPosition, StartDate, ExpiryDate and Warning
"Warning" field will return the result "Expired" if True and "Unexpired" if False
And Additional, I want to make before 30days date of expiration which is based on "ExpiryDate" there will be notice or pop up message "To be renew" .Warning calculated EXACTLY 30 days before the expiration, then I MUST ensure that the database runs the expiration warning code at least once every day. A method which flags expirations WITHIN 30 days would ensure that, if i miss a day, i'll still see the warning.

Thank you so much...Your help was highly appreciated.
 
Sir as i did researching again i got already the answer on my previous question.

What i want next is to have a label blinking. "To Be Renew" is label i want to blink. I changed previous "Expired" to "To Be Renew"

Private Sub Form_Timer()
Me!ToBeRenew.Visible = Not (ToBeRenew.Visible)
End Sub
Timer Interval set to 1000
This code i used but still i don't see any blinking.

"To Be Renew" is not a field or labelname. It is a return value of this code in a query"Remarks: IIf(Date()>=[ExpiredDate],"To Be Renew","Unexpired")".

Can you please help me how to do this. Your help is highly appreciated.
 
Give this a try. Make sure to replace "YourControlName" with the control you want to flash. Let me know how that works.


Code:
Private Sub Form_Timer()
  if me.toberenew="To Be Renew" then
     select case me.YourControlName.visible
         case false
             me.YourControlName.visible=true
         case true
             me.YourControlName.visible=false
     end select 
   end if
end sub
 
Sir Thanks for the reply.
Is the textControlName is the name of the text box field where the result which is "To Be Renew" return? If that then "Remarks" i used.But it is not working sir.

Private Sub Form_Timer()
If Me.toberenew = "To Be Renew" Then
Select Case Me.Remarks.Visible
Case False
Me.Remarks.Visible = True
Case True
Me.Remarks.Visible = False
End Select
End If
End Sub
 
I just tested this with a label in a new database in a blank form, and it works. Are you sure you have the correct control name?

On second thought, test to see if the first if statement fires. Try this:
Code:
Private Sub Form_Timer()
    If Me.toberenew = "To Be Renew" Then
msgbox ""
        Select Case Me.Remarks.Visible
            Case False
                Me.Remarks.Visible = True
            Case True
                Me.Remarks.Visible = False
        End Select
    End If
End Sub

When you open your form, if you do not get a message box after the timer goes off, then the first line is wrong. IMPORTANT-increase you timer so you don't get bogged down. Maybe try 5000.
 
Sir I changed the control name to txtRemarks because the control source is Remarks also, i increased then the Timer to 5000 still ddint work and no message box too.
Private Sub Form_Timer()
If Me.toberenew = "To Be Renew" Then
MsgBox ""
Select Case Me.txtRemarks.Visible
Case False
Me.txtRemarks.Visible = True
Case True
Me.txtRemarks.Visible = False
End Select
End If
End Sub

Sir the one that i want it to be flash were the result value under "Remarks" field and It is a return value of this code in a query "Remarks: IIf(Date()>=[ExpiredDate],"To Be Renew","Unexpired")". Sir i really cannot get through it. I don't get which control name you are trying to explain to me.
 
I did not read the rest of your comment because the first if statement did not fire. You need to figuie out why. What does me.toberenew equal?
 

Users who are viewing this thread

Back
Top Bottom