Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 60

Thread: VB 6 need help

  1. #21

    @sprocket:

    '------------------kung A-Z LANG IMO gusto ipa.input-----------------------------
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 65 Or KeyAscii > 90) And (KeyAscii < 97 Or KeyAscii > 122) Then
    KeyAscii = 0
    End If
    End Sub
    '--------------------------------------------------------------------------------

    '------------------kung 0-9 ang DILI nimo gusto ipa.input-------------------------
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Then
    KeyAscii = 0
    End If
    End Sub
    '--------------------------------------------------------------------------------
    '' i.add lang ni before sa THEN
    AND KeyAscii<> vbKeyBack '--para maka.backspace
    AND KeyAscii<> 44 '--para pwede ang comma(,)
    AND KeyAscii<> 46 '--para pwede ang period or dot(.)

    ' AFAIK each character has equivalent ascii code...
    ' A=65, a=97
    'if gusto u makabalo sa KeyAscii sa iba na characters:
    Msgbox Asc("character") 'character = ang character na gusto nimo masabtan ang Ascii code
    'if gusto u makabalo what character :
    MsgBox chr(65) 'change 65 to any number....

    '''''''happy coding

  2. #22
    error trapping sa special char? wala pa jud ni nako nakuha.

    and error trapping sa date. dli man gud pwede system date. mm\dd\yyyy

  3. #23
    '------------------kung A-Z LANG IMO gusto ipa.input-----------------------------
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 65 Or KeyAscii > 90) And (KeyAscii < 97 Or KeyAscii > 122) Then
    KeyAscii = 0
    End If
    End Sub
    '--------------------------------------------------------------------------------
    'much better dili nlng nimo xa painputon ug special character...

    'and error trapping sa date. dli man gud pwede system date. mm\dd\yyyy
    'Wat u buot pasabot

    ' i suggest use DTPicker for the date and/or time
    'Project menu > Components (Ctrl+T)
    'look and check Microsoft Windows Common Controls-2 6.0 (MScomct2.ocx)
    'makakita naka sa toolbox ug DTPicker....
    'JUST EXPLORE ----------- AND LEARN

  4. #24
    Quote Originally Posted by rhex_tendo View Post
    '------------------kung A-Z LANG IMO gusto ipa.input-----------------------------
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 65 Or KeyAscii > 90) And (KeyAscii < 97 Or KeyAscii > 122) Then
    KeyAscii = 0
    End If
    End Sub
    '--------------------------------------------------------------------------------
    'much better dili nlng nimo xa painputon ug special character...

    'and error trapping sa date. dli man gud pwede system date. mm\dd\yyyy
    'Wat u buot pasabot

    ' i suggest use DTPicker for the date and/or time
    'Project menu > Components (Ctrl+T)
    'look and check Microsoft Windows Common Controls-2 6.0 (MScomct2.ocx)
    'makakita naka sa toolbox ug DTPicker....
    'JUST EXPLORE ----------- AND LEARN

    dli pwede system date ibutang txtdate.text. need to input jud.

    need jud trapping ang special chars. still learning how. just checking unsa mga advice sa uban tao.

  5. #25
    'try this
    Private Sub Command1_Click()
    If Not IsDate(Text1.Text) Then
    MsgBox "INVALID DATE"
    ElseIf CDate(Date) = CDate(Text1.Text) Then
    MsgBox "DATE YOU ENTERED IS EQUAL TO SYSTEM DATE."
    End If
    End Sub

    'need jud trapping ang special chars. still learning how. just checking unsa mga advice sa uban tao.
    '
    wat u buot pasabot?
    'allow makainput ug special character then i.trap niya when u click a button (like saving)?
    'or dili jud nim ipakita sa textbox ang iya g.type n special character

  6. #26
    Quote Originally Posted by rhex_tendo View Post
    'try this
    Private Sub Command1_Click()
    If Not IsDate(Text1.Text) Then
    MsgBox "INVALID DATE"
    ElseIf CDate(Date) = CDate(Text1.Text) Then
    MsgBox "DATE YOU ENTERED IS EQUAL TO SYSTEM DATE."
    End If
    End Sub

    'need jud trapping ang special chars. still learning how. just checking unsa mga advice sa uban tao.
    '
    wat u buot pasabot?
    'allow makainput ug special character then i.trap niya when u click a button (like saving)?
    'or dili jud nim ipakita sa textbox ang iya g.type n special character
    how to format ang date na mm/dd/yyyy para ma compare?

  7. #27
    Quote Originally Posted by rhex_tendo View Post
    @sprocket:

    '------------------kung A-Z LANG IMO gusto ipa.input-----------------------------
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii < 65 Or KeyAscii > 90) And (KeyAscii < 97 Or KeyAscii > 122) Then
    KeyAscii = 0
    End If
    End Sub
    '--------------------------------------------------------------------------------

    '------------------kung 0-9 ang DILI nimo gusto ipa.input-------------------------
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii >= vbKey0 And KeyAscii <= vbKey9) Then
    KeyAscii = 0
    End If
    End Sub
    '--------------------------------------------------------------------------------
    '' i.add lang ni before sa THEN
    AND KeyAscii<> vbKeyBack '--para maka.backspace
    AND KeyAscii<> 44 '--para pwede ang comma(,)
    AND KeyAscii<> 46 '--para pwede ang period or dot(.)

    ' AFAIK each character has equivalent ascii code...
    ' A=65, a=97
    'if gusto u makabalo sa KeyAscii sa iba na characters:
    Msgbox Asc("character") 'character = ang character na gusto nimo masabtan ang Ascii code
    'if gusto u makabalo what character :
    MsgBox chr(65) 'change 65 to any number....

    '''''''happy coding

    bro salamat kaau...

  8. #28
    @lesta1116:
    'how to format ang date na mm/dd/yyyy para ma compare?

    text1.text=Format(date,"mm/dd/yyyy")

    '-------------------------------------------
    'how to format ang date na mm/dd/yyyy para ma compare?

    If CDate(Date) = CDate(Text1.Text) Then
    MsgBox "DATE YOU ENTERED IS EQUAL TO SYSTEM DATE."
    End If
    'way to compare dates....

  9. #29
    Quote Originally Posted by rhex_tendo View Post
    @lesta1116:
    'how to format ang date na mm/dd/yyyy para ma compare?

    text1.text=Format(date,"mm/dd/yyyy")

    '-------------------------------------------
    'how to format ang date na mm/dd/yyyy para ma compare?

    If CDate(Date) = CDate(Text1.Text) Then
    MsgBox "DATE YOU ENTERED IS EQUAL TO SYSTEM DATE."
    End If
    'way to compare dates....
    thanks. post more problem if i find one.
    sure next problem error trapping on database na. specially empty ang data base. or gibackdoor then gi kuhaan some data.

  10. #30
    Quote Originally Posted by l_e_n_c_e View Post
    sakto ni ka @rhex_tendo...just change the "Byref" to "Byval"

    @lestat1116....just try this one.

    ****frmEntry
    Private Sub Command1_Click()
    Call ClearGrid(grid, Row)
    Call Clear
    End Sub

    Private Sub Form_Load()
    Me.grid.AddItem "test", 1
    Me.grid.AddItem "test2", 2
    End Sub

    ****from module
    Public Sub Clear()

    'Call ClearGrid(grid, Row)

    Row = 1
    totalAmt = 0
    totalqty = 0

    'txtPO.SetFocus
    End Sub

    Public Sub ClearGrid(ByVal grid As MSFlexGrid, ByVal Row As Integer)
    grid.Clear
    grid.Rows = 2
    grid.FormatString = grid.FormatString
    Row = 1
    End Sub
    mo error cya. run time error 424 object required.
    mo ni actual code
    'from form1

    'CLEAR
    Private Sub cmdClear_Click()
    Call Clear
    Call ClearGrid(grdRow, Row)
    End Sub


    from module
    'CLEAR FUNCTION
    Public Sub Clear()

    Row = 1
    totalAmt = 0
    totalqty = 0

    txtCustNo.Text = ""
    txtPO.Text = ""
    txtItemCode.Text = ""
    txtQty.Text = ""
    txtPrep.Text = ""

    txtPO.SetFocus
    End Sub

    'clear grid
    Public Sub ClearGrid(ByVal grid As MSFlexGrid, ByVal Row As Integer)
    grid.Clear
    grid.Rows = 2
    grid.FormatString = grid.FormatString
    Row = 1
    End Sub

  11.    Advertisement

Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

 
  1. Need help in VB 6.0 and VB.Net?
    By rhex_tendo in forum Programming
    Replies: 10
    Last Post: 08-31-2010, 01:01 PM
  2. VBS need help
    By ManoyanX in forum Programming
    Replies: 2
    Last Post: 02-12-2010, 07:58 PM
  3. Replies: 1
    Last Post: 04-02-2009, 08:41 AM
  4. Who needs help with their vb/c# projects?
    By Cruzader in forum Programming
    Replies: 19
    Last Post: 02-24-2009, 02:44 PM
  5. Replies: 1
    Last Post: 07-30-2005, 01:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top