Kalo Cuma pilihan 1 dan 2 aja mendingan pake radio button/option button atau combo box juga bisa
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of munawar shaleh Sent: Tuesday, 05 December 2006 13:22 To: [email protected] Subject: RE: [indoprog-vb] Re: harus diisi dengan angka bukan huruf itu kok tetep sama aja ya? mis: saya masukkan angka 1 muncul "harus angka" saya masukkan angka 2 muncul "harus angka" tapi kalo saya masukkan angka 23 atau 218 >>benar, muncul "level salah" apanya yang salah? o iya "If KeyAscii >= 58 Or (KeyAscii <= 47 And KeyAscii <> 45 And KeyAscii <>8 And KeyAscii <> 13) Then" maksudnya apa? tolong di jelaskan ya... saya bingung terima kasih atas bantuannya.... "Meilizar, Ardhy" <[EMAIL PROTECTED] <mailto:ardhy.meilizar%40adidas.com.hk> > wrote: Oh itu mungkin mestinya begini If (Text5.Text <> "1") And (Text5.Text <> "2") ________________________________ From: [email protected] <mailto:indoprog-vb%40yahoogroups.com> [mailto:[email protected] <mailto:indoprog-vb%40yahoogroups.com> ] On Behalf Of telur_asin41 Sent: Tuesday, 05 December 2006 12:08 To: [email protected] <mailto:indoprog-vb%40yahoogroups.com> Subject: [indoprog-vb] Re: harus diisi dengan angka bukan huruf maksud saya itu tidak ditaruh di keypressnya, tapi di command_click. trus masalahnya, saya kan juga membuat code dimana textbox itu hanya bisa diisi dengan angka 1 atau 2 saja. source yang mas kasih sudah saya taruh. tapi kok ada error ya? ini source saya : Private Sub Command1_Click() If (Text2.Text = "") Or (Text3.Text = "") Or (Text4.Text = "") Or (Text5.Text = "") Then MsgBox "data kurang lengkap", , "save" Else If (Text5.Text <> 1) And (Text5.Text <> 2) Then MsgBox "level salah", , "save" Text5.Text = "" Else If keyascii >= 58 Or (keyascii <= 47 And keyascii <> 45 And keyascii <> 8 And keyascii <> 13) Then MsgBox "harus angka", , "" keyascii = 0 Else With Adodc1.Recordset '!iduser = Text1.Text !nama = Text2.Text !UserName = Text3.Text !Password = Text4.Text !Status = Text5.Text .Update End With Command1.Enabled = False MsgBox "data telah masuk database", , "save" End If End If End If End Sub salahnya pada "If (Text5.Text <> 1) And (Text5.Text <> 2) Then" ada alert yang tulisannya "runtime error '13'" "type mismatch" mohon bantuannya sekali lagi ya? penting banget :) _________________________________________________________ --- In [email protected] <mailto:indoprog-vb%40yahoogroups.com> <mailto:indoprog-vb%40yahoogroups.com> , "Meilizar, Ardhy" <[EMAIL PROTECTED]> wrote: > > Taroh code ini di event keypress nya textbox tersebut > > > > If KeyAscii >= 58 Or (KeyAscii <= 47 And KeyAscii <> 45 And KeyAscii <> > 8 And KeyAscii <> 13) Then > > KeyAscii = 0 > > End If > > > > > > ________________________________ > > From: [email protected] <mailto:indoprog-vb%40yahoogroups.com> <mailto:indoprog-vb%40yahoogroups.com> [mailto:[email protected] <mailto:indoprog-vb%40yahoogroups.com> <mailto:indoprog-vb%40yahoogroups.com> ] > On Behalf Of telur_asin41 > Sent: Tuesday, 05 December 2006 11:37 > To: [email protected] <mailto:indoprog-vb%40yahoogroups.com> <mailto:indoprog-vb%40yahoogroups.com> > Subject: [indoprog-vb] harus diisi dengan angka bukan huruf > > > > mau tanya nih > > saya kan punya textbox, maksud saya > textbox itu hanya bisa diisi dengan angka, bukan huruf > kalau diisi dengan huruf akan keluar msgbox "harus diisi angka" > > sourcenya gimana ya? > > mohon bantuan :( This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you. [Non-text portions of this message have been removed] --------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know. [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
