Results 1 to 3 of 3

Thread: how to hide list on combo box in visual basic using MYSQL command??

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2013
    Posts
    35

    how to hide list on combo box in visual basic using MYSQL command??

    ok this is my code :
    Code:
    Private Sub cmbPelanggan_Click()
        Set Rs_Pelanggan = New ADODB.Recordset
        Rs_Pelanggan.Open "SELECT * FROM Penjualan WHERE " _
            & " no_nota ='" & Left(cmbPelanggan.Text, 10) & "'", _
            KonekDb, adOpenDynamic, adLockBatchOptimistic
            
        With Rs_Pelanggan
            If .EOF And .BOF Then
                 MsgBox "eror", vbOKOnly + vbCritical, "Error"
                Exit Sub
           
    .
    .
    .
    so everytime i want to klik the combobox button, it will reveal some list based on condition like no_nota list at tabel penjualan at my DB.
    so, how can i hide all the item on DB that doesnt need requirment if i add code like
    Code:
    & " AND catatan =' '", _
    on it?
    because when i try it, the list still the same (old list), but the function still works, like it will not proceed if the condition meet. but i think its better if i can hide them than reveal it but in the end its still unaccesable.

    any suggestion/critics/etc are welcome.
    thnx in advance.

  2. #2
    New Member
    Join Date
    May 2013
    Posts
    14

    Re: how to hide list on combo box in visual basic using MYSQL command??

    Could you post a screenshot of the error message after compiling it together?

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2013
    Posts
    35

    Re: how to hide list on combo box in visual basic using MYSQL command??

    Quote Originally Posted by 10gez10 View Post
    Could you post a screenshot of the error message after compiling it together?
    hello there,,
    thnx for your time but i allready solved it after re-checking the sql query

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width