Hello Hendra
It seems that the only calculation required here is a conversion of month
number to roman numerals - is this correct?
If so, there is a function here that will perform the conversion for you:
http://support.microsoft.com/kb/184657
Just use Num2Roman(Month([TglSPT])) as part of your string.
Another method, since the range of numbers to convert is small and
predictable, is to use the Choose function:
Choose(Month([TglSPT]), "I", "II", "III", "IV", "V", "VI", "VII", "VIII",
"IX", "X", "XI", "XII")
Best wishes,
Graham
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
agesthahendra@ymail.com
Sent: Friday, 4 January 2013 06:29
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Run VBA codes in query
Hi everyone,,, :)
Can we run vba codes in query..? for example i can run this codes below on
click button on a form, but is it possible to run the codes in query..? Here
is the codes sample:
If Month([TglSPT]) = 1 Then
Me.ExInt = "/SP/Set-DPRD/I/" & Year([TglSPT])
Me.NoSPPD_2 = "/SPPD/Set-DPRD/I/" & Year([TglSPT])
ElseIf Month([TglSPT]) = 2 Then
Me.ExInt = "/SP/Set-DPRD/II/" & Year([TglSPT])
Me.NoSPPD_2 = "/SPPD/Set-DPRD/II/" & Year([TglSPT])
Else Month([TglSPT]) = 3 Then
Me.ExInt = "/SP/Set-DPRD/III/" & Year([TglSPT])
Me.NoSPPD_2 = "/SPPD/Set-DPRD/III/" & Year([TglSPT])
Any explanation would be grateful,...thank you
Regards
Hendra Agestha
[Non-text portions of this message have been removed]
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar