Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   A little help required with VBA in Access please (Dates) (https://www.cableforum.uk/board/showthread.php?t=26145)

Raistlin 23-03-2005 13:50

A little help required with VBA in Access please (Dates)
 
Hi Guys,

This is probably very simple but I don't really know where to start.....

I want to evaluate what time it is and then have a message box pop up that says "Good Morning" if it's AM and "Good Afternoon" if it's PM.

(That's not really quite what I want to do but I'd like to get that working and then try and adapt it for my own needs from there)

Anybody know how I can accomplish this?

Thanks.

gary_580 23-03-2005 14:04

Re: A little help required with VBA in Access please (Dates)
 
If Hour(Now) > "11" Then
MsgBox "PM"
Else
MsgBox "AM"
End If

Raistlin 23-03-2005 14:06

Nice one Gary mate, knew it was probably simple enough :D


All times are GMT. The time now is 05:15.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum