maaf sebelumnya, saya belum begitu mahir dalam macro (karena jarang pake
sih)
tapi saya kok belum bisa membuat macro autokeys untuk Alt+enter
untuk ngakalin bypass tombol 'Alt+Enter' yang di inginkan
jadi coba trik dari saya ini :

'================
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 4 Then
'error trap untuk alt+Enter, begitu dialog property muncul, langsung di
close
    If KeyCode = 13 Then SendKeys "%{F4}"

End If
end sub

Pada tanggal 20/11/07, Erwin Sugiawan <[EMAIL PROTECTED]> menulis:
>
>   gue ikut nyumbang suara untuk vote solusi ini :)
>
> macro Name {F1}       Action RunCode  Function Name=FnAutokey("F1")
> macro Name {F2}       Action RunCode  Function Name=FnAutokey("F2")
> macro Name   +{F3} == > shift F3  Action Function Name RunCode
> =FnAutokey("+F3")
>
> dsb
>
> Function fnAutoKey(KeyType As String)
> Select Case KeyType
>     Case Is = "F1"
>            .......................
>     Case Is = "F2"
>         .......................
>    Case Is = "F7", "^L"   ==> tanda ^ arti nya ctrl
>         ..............
> end Select
> end function
>
>
>
> terus kalo mau di permak lagi, dalam form user nya gunakan event on key
> down
> and  kalo mau matikan tombol shift saat buka program access gunakan
>
> Sub SetStartupProperties(ByVal txtUsrName As String)
> Dim TF As Boolean
>
> Const DB_Text As Long = 10
> Const DB_Boolean As Long = 1
>
> If txtUsrName = "Erwin" Then
>     TF = True
> Else
>     TF = False
> End If
>     ChangeProperty "StartupForm", DB_Text, "frmLogon"
>     ChangeProperty "StartupShowDBWindow", DB_Boolean, TF
>     ChangeProperty "StartupShowStatusBar", DB_Boolean, TF
>     ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True
>     ChangeProperty "AllowFullMenus", DB_Boolean, TF
>     ChangeProperty "AllowBreakIntoCode", DB_Boolean, TF
>     ChangeProperty "AllowSpecialKeys", DB_Boolean, TF
>     ChangeProperty "AllowBypassKey", DB_Boolean, TF
> End Sub
>
>
> Function ChangeProperty(strPropName As String, varPropType As Variant,
> varPropValue As Variant) As Integer
>     Dim dbs As Object, prp As Variant
>     Const conPropNotFoundError = 3270
>
>     Set dbs = Application.CurrentProject()
>     On Error GoTo Change_Err
>     dbs.Properties(strPropName) = varPropValue
>     ChangeProperty = True
>
> Change_Bye:
>     Exit Function
>
> Change_Err:
>     If Err = conPropNotFoundError Then    ' Property not found.
>         With CurrentProject.Properties
>             .Add strPropName, varPropValue
>         End With
>         Resume Next
>     Else
>         ' Unknown error.
>         ChangeProperty = False
>         Resume Change_Bye
>     End If
> End Function
>
>
> Best regard
> Erwin Sugiawan
>
> ----- Original Message ----
> From: Haer Talib <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Tuesday, November 20, 2007 2:00:10 PM
> Subject: Re: [belajar-access] Re: disable alt+enter, alt+F4, ,alt+F11
>
> kalo gitu bisa tambah dg macro AutoKeys.
>
> Buat sebuah macro dan beri nama AutoKeys. Jangan salah ya namanya.
> di dalam nya anda definisikan tombol yg ingin anda trap, lalu arahkan ke
> sesuatu yang lain, misalnya msgbox("anda menekan tombol yg gak diperlukan"),
> atau bisa juga kosongin aja.
> Nah, karena macro ini lebih diprioritaskan oleh access, maka ketika user
> menekan tombol tersebut, fungsi yg aslinya tdk dilaksanakan.
>
> Penjelasan lebih lanjut lihat di Help under "Assign an action or set of
> actions to a key".
>
> Semoga berhasil.
>
> Haer
>
>
>
> On Nov 20, 2007 9:34 AM, soeasy_goin <[EMAIL PROTECTED]> wrote:
>
> > masih gak mau kang, ketika running..user masih bisa aktifkan alt+enter
> > (properties), bahkan bisa merubah value dari properties tsb.
> >
> > ada beberapa fungsi yang sudah gak jalan ketika "use access special
> > keys" dinonaktifkan, tapi bukan fungsi2 yang saya inginkan..terutama
> > menonaktifkan properties, & memproteksi user untuk close applikasi
> > lewat alt+f4, & alternatif keys lainnya yang bertujuan untuk merubah
> > isi dari design access
> >
> >
> > thanks atas infonya yah..
> >
> >
> > de2n
> >
> > --- In [email protected], "Haer Talib" <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > Coba menu Tools > Startup, lalu hilangkan tanda centang di opsi "Use
> > Access
> > > Special Keys".
> > >
> > > Haer
> > >
> > >
> > > On Nov 19, 2007 7:46 PM, soeasy_goin <[EMAIL PROTECTED]> wrote:
> > >
> > > > hi all, saya newbie + baru gabung disini, & butuh pencerahan..
> > > >
> > > > bagaimana menghilangkan shortcut built up di msaccess yg kita buat,
> > > > terutama fungsi alt+enter (properties), alt+F4 (bypass close
> > > > application), F11, dll..dengan tujuan untuk menghindari user iseng
> > > > otak+atik aplikasi yang dibuat..
> > > >
> > > >
> > > > tengkyu atas pencerahannya...
> > > >
> > > > de2n
> > > >
> > > >
> > > >
> > > > SPAM IS PROHIBITED
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> > SPAM IS PROHIBITED
> > Yahoo! Groups Links
> >
> >
> >
> >
>
>
> ------------------------------
> Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try
> it 
> now.<http://us.rd.yahoo.com/evt=51731/*http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ%0A>
>
>  
>



-- 
---------------------------------------------
   grapyak-semanak-cluthak
http://djmumun.wordpress.com
---------------------------------------------

Kirim email ke