Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

Pls check code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobUCSD - 10 Jun 2007 18:00 GMT
With the code below the cmdVisitEdit is always invisible. this is in the on
current event. It shouldn't be always invisible if the tests work. If the out
of room time is over 30 minutes or if visit date is not today, then the
cmdVisitedit should be visible. Anybody have any ideas as to why it's not
working?

Thanks, Rob

If DateDiff("n", Me.OutOfRoom, Now) >= 30 Or Me.VisitDate <> Date Then
 
   Me.cmdVisitEdit.Visible = False
   Else
   Me.cmdVisitEdit.Visible = True
RobUCSD - 10 Jun 2007 18:15 GMT
The line "If the out of room time is over 30 minutes or if visit date is not
today, then the cmdVisitedit should be visible" should read "....the
cmdVisitEdit should be inVisible" Sorry for the confusion.

>With the code below the cmdVisitEdit is always invisible. this is in the on
>current event. It shouldn't be always invisible if the tests work. If the out
[quoted text clipped - 9 lines]
>    Else
>    Me.cmdVisitEdit.Visible = True
Marshall Barton - 10 Jun 2007 18:15 GMT
>With the code below the cmdVisitEdit is always invisible. this is in the on
>current event. It shouldn't be always invisible if the tests work. If the out
[quoted text clipped - 7 lines]
>    Else
>    Me.cmdVisitEdit.Visible = True

You probably only have a time value in the OutOfRoom text
box (which means it date part is 12/30/1899).  If so, you
ahould use the Time function instead of Now.

Signature

Marsh
MVP [MS Access]

RobUCSD - 10 Jun 2007 18:28 GMT
Marshall, thanks for your response. Here's what I changed it to, but the
visit button is still not visible when the correct criteria are met. The
field OutOfRoom is a date/time field with a short time format. Any other
thoughts, thanks Rob

If DateDiff("n", Me.OutOfRoom, Time) >= 30 Or Me.VisitDate <> Date Then

>>With the code below the cmdVisitEdit is always invisible. this is in the on
>>current event. It shouldn't be always invisible if the tests work. If the out
[quoted text clipped - 5 lines]
>box (which means it date part is 12/30/1899).  If so, you
>ahould use the Time function instead of Now.
RobUCSD - 10 Jun 2007 18:37 GMT
Marshall, thanks. I got this working by changing Now to Time(). Thanks for
your help this sunday am. Hope you have a great day. Rob

>Marshall, thanks for your response. Here's what I changed it to, but the
>visit button is still not visible when the correct criteria are met. The
[quoted text clipped - 8 lines]
>>box (which means it date part is 12/30/1899).  If so, you
>>ahould use the Time function instead of Now.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.