Jx_Man 987 Nearly a Senior Poster Featured Poster

same as pgmer, you must ensure that your query is correct.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Adodc4.Recordset.Fields(cmbMonth.Text) = txtLecturesattended.Text you must input field name and add adodc4.refresh before it
it should be like this :

Adodc4.Refresh
Adodc4.Recordset.Fields("FieldName") = txtLecturesattended.Text
Adodc4.Recordset.Update
Jx_Man 987 Nearly a Senior Poster Featured Poster

send keys has a key code like honey61399 said..u can't write it straight..
see this site

Jx_Man 987 Nearly a Senior Poster Featured Poster

hmm..i got wrong here..

Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDown Then
    List1.ToolTipText = List1.List(List1.ListIndex + 1)
ElseIf KeyCode = vbKeyUp Then
    List1.ToolTipText = List1.List(List1.ListIndex - 1)
End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

post the codes friend.. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

i'm modified andreRet code a bit ;)

Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDown Or KeyCode = vbKeyUp Then
    List1.ToolTipText = List1.List(List1.ListIndex + 1)
End If
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

show your effort friend..

Jx_Man 987 Nearly a Senior Poster Featured Poster
me.dispose(false)
Jx_Man 987 Nearly a Senior Poster Featured Poster

@AndreRet : alleybye learn much about date from u, i think ;)

Jx_Man 987 Nearly a Senior Poster Featured Poster

stats79,, are u using vb.net or vb6?
streamreader is a function in vb.net not in vb6..

Jx_Man 987 Nearly a Senior Poster Featured Poster

swap textboxes or value in texboxes?

Jx_Man 987 Nearly a Senior Poster Featured Poster

your question is not clear..
i can't understand what you mean exactly but i try to answer it..

you want to manage forms depend on user rules.
Use File Menu,,you can disable links on file menu depend on their authority..
After login form, show the main form that contain menu..
so, user only access forms of their rules..

Jx_Man 987 Nearly a Senior Poster Featured Poster

'in another form

classname.InsertNewRecord()
Jx_Man 987 Nearly a Senior Poster Featured Poster

Ok..i'm modified codes a bit..just for load data..as simple as u want..
like debasisdas said..if u familiar with vb6 database coding then mysql is not different with another dbms..

1 listview named listaddress, 1 button named btnView

Public Conn As New ADODB.Connection
Public rs As New ADODB.Recordset

Public Sub AturListView(LSV As ListView, ParamArray lstview())
    Dim i, width
    LSV.View = lvwReport
    width = LSV.width - 80
    With LSV.ColumnHeaders
        .Clear
        For i = 0 To UBound(lstview) - 1 Step 2
        .Add , , lstview(i), (lstview(i + 1) * width) / 100
        Next i
    End With
End Sub

Public Sub ShowData(LSV As ListView)
    Call AturListView(LSV, "Address Id", 12, "First Name", 18, _
    "Last Name", 18, "Phone Number", 20, "Email", 32)
            
    'Set rs = New ADODB.Recordset
    rs.Open "SELECT * FROM AddressData", _
        Conn, adOpenDynamic, adLockBatchOptimistic
    
    LSV.ListItems.Clear
    
    While Not rs.EOF
        Set View = LSV.ListItems.Add
        View.Text = rs!IdAddress
        View.SubItems(1) = rs!First_Name
        View.SubItems(2) = rs!Last_Name
        View.SubItems(3) = rs!Phone_Num
        View.SubItems(4) = rs!Email
        rs.MoveNext
    Wend
    rs.Close
    
End Sub

Public Sub Connect()
Dim ConnString As String
Dim db_name As String
Dim db_server As String
Dim db_port As String
Dim db_user As String
Dim db_pass As String
' error traping
On Error GoTo buat_koneksi_Error
' fill the variable
db_name = "AddressBook"
db_server = "localhost" '
db_port = "3306"    'default port is 3306
db_user = "root"    'default user name.
db_pass = "adinda"  ' depend on your password on mysql
'/Create connection string
ConnString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_user & …
Estella commented: Owesome +4
Jx_Man 987 Nearly a Senior Poster Featured Poster

or more shorter :

Private Sub AddDaysToMonthBox(ByVal Day As Integer)
        Dim i As Integer
        With DayBox.Items
            For i = 1 To Day
                .Add(i)
            Next
        End With
    End Sub

    Private Sub monthBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MonthBox.SelectedIndexChanged
        Dim i As Integer
        If MonthBox.SelectedIndex = 1 Then
            If IsNumeric(YearBox.Text) Then
                If Int(YearBox.Text) > 1950 Or Int(YearBox.Text) < 1996 Then
                    If Date.IsLeapYear(Int(YearBox.Text)) Then
                        AddDaysToMonthBox(29)
                    Else
                        AddDaysToMonthBox(28)
                    End If
                Else
                    AddDaysToMonthBox(31)
                End If
            End If
        End If
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

1. Add the days until 31 on MonthBox Collection
2. Just check leap year on MonthBox Event, you didn't need to check on YearBox Event.

it's like this :

Private Sub monthBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MonthBox.SelectedIndexChanged
        Dim i As Integer
        If MonthBox.SelectedIndex = 1 Then
            If IsNumeric(YearBox.Text) Then
                If Int(YearBox.Text) > 1950 Or Int(YearBox.Text) < 1996 Then
                    If Date.IsLeapYear(Int(YearBox.Text)) Then
                        With DayBox.Items
                            For i = 1 To 29 ' if leap year
                                .Add(i)
                            Next
                        End With
                    Else
                        With DayBox.Items
                            For i = 1 To 28 ' if not leap year
                                .Add(i)
                            Next
                        End With
                    End If
                End If
            End If
        Else
            With DayBox.Items
                For i = 1 To 31
                    .Add(i)
                Next
            End With
        End If
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

just check leap year on monthbox event..so u didn't need to check on yearbox event.

Jx_Man 987 Nearly a Senior Poster Featured Poster

after installing odbc connector then u can access mysql.

open vb6 project
add a button,
add references (Project->References), Find and Mark Microsoft ActiveX Data Objects 2.5 Library

then add this codes below :

Public Conn As New ADODB.Connection

Private Sub Command1_Click()
Dim ConnString As String
Dim db_name As String
Dim db_server As String
Dim db_port As String
Dim db_user As String
Dim db_pass As String
' error traping
On Error GoTo buat_koneksi_Error
' fill the variable
db_name = "MySQL"
db_server = "localhost" '
db_port = "3306"    'default port is 3306.
db_user = "root"    'default user name or depend on your user name on mysql.
db_pass = "adinda"  'depend on your password on mysql.
'/Create connection string
ConnString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_user & ";PWD=" & db_pass & ";PORT=" & db_port & ";OPTION=3"
'/Open Connection
With Conn
    .ConnectionString = ConnString
    .Open
End With

MsgBox "Connected"
'___________________________________________________________
On Error GoTo 0
Exit Sub
 
buat_koneksi_Error:
    MsgBox "Error, Please check if server is running!", vbInformation, "Check Server"
End Sub

Private Sub Form_Unload(Cancel As Integer)
If Conn.State = adStateOpen Or Conn.State = adStateConnecting Then
   Conn.Close
   Set Conn = Nothing
End If
End Sub
AndreRet commented: Well executed. +6
Jx_Man 987 Nearly a Senior Poster Featured Poster
me.combobox1.text = 3
Jx_Man 987 Nearly a Senior Poster Featured Poster

using odbc..
download the odbc connector here

Jx_Man 987 Nearly a Senior Poster Featured Poster

haha..i'm just like your posting..just it friend.. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

AndreRet : actually u give a complete guide :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

actualy,,i just added a parameter, it cause your procedure never get the value (inc) updated when u checking the inc or maxrow. so, an error depend on your codes.
so where the error exactly? which line of your codes?

Jx_Man 987 Nearly a Senior Poster Featured Poster

MySQL is free..

Jx_Man 987 Nearly a Senior Poster Featured Poster

control box?
u mean title bar?
using API files i think..

Jx_Man 987 Nearly a Senior Poster Featured Poster

your procedure navigaterecords() not have a parameter..
so when u call it, your procedure didn't get new value of inc variable.

so,, add the parameter on your procedure :

Public Sub navigaterecords(ByVal inc as Integer)
...
End sub

when call :

If inc <> 0 Then
    inc = 0
    navigaterecords(Inc)
End If
Jx_Man 987 Nearly a Senior Poster Featured Poster

on any event :

SendKeys.Send("{ENTER}") 'for enter
SendKeys.Send("{%}") 'for Alt
SendKeys.Send("{^}") 'for Ctrl
SendKeys.Send("{+}") 'for shift
' Combination
SendKeys.Send("^(c)") 'for Ctrl-C


More information, go to msdn online

anyway you posting on wrong section..this section for vb 4,5,6 not for vb.net section.

Fa3hed commented: good +1
Estella commented: Yes. that way +3
Jx_Man 987 Nearly a Senior Poster Featured Poster

@Jaseem Ahmed : your code use sql server or access for database?
@AndreRet : i think this code using sql server, coz your codes using for access, maybe u missed it :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

your information is not clear..

Jx_Man 987 Nearly a Senior Poster Featured Poster

what the problem with your code friend?

Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

simplier?
i think there are simple enough..
my link and debasisdas link are same..
and like debasisdas said..the codes aren't complex..
just contains many if-else statment..

Sawamura commented: thx +4
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

show how far u trying it..
just post the codes where u have a wrong logic of put a msgbox..

Jx_Man 987 Nearly a Senior Poster Featured Poster

DHARAMVEER,,
post your own thread..dont raise old thread..

Jx_Man 987 Nearly a Senior Poster Featured Poster

Try the following codes:


Copy

Clipboard.Clear
Clipboard.SetText ActiveForm.ActiveControl.SelText, vbCFText

Cut

Clipboard.Clear
Clipboard.SetText ActiveForm.ActiveControl.SelText, vbCFText
ActiveForm.ActiveControl.SelText = ""

Paste

If Clipboard.GetFormat(vbCFText) Then
ActiveForm.ActiveControl.SelText = Clipboard.GetText(vbCFText)
End If
AndreRet commented: Nicely executed. +6
Jade_me commented: its done..thx :) +4
Jx_Man 987 Nearly a Senior Poster Featured Poster

post your code friend..we try to helpp u :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

txtAccountHolder.Text = myDataReader.Item("First_Name&" - " &Surname")tostring]

chage it with :

txtAccount_Name.Text = myDataReader.Item("First_Name").ToString & "-" & myDataReader.Item("Surname").ToString
Sawamura commented: Nice +4
dnk commented: fast.. +4
Jx_Man 987 Nearly a Senior Poster Featured Poster

make a procedure to select the last number on tran_head and add it with 1..that a autonumber logic..

Jx_Man 987 Nearly a Senior Poster Featured Poster

do like codeorder codes..and add timer to make it moving like an animation.

Jx_Man 987 Nearly a Senior Poster Featured Poster

install .net framework first on client pc

Jx_Man 987 Nearly a Senior Poster Featured Poster

post your codes friend..we will fix it..

Jx_Man 987 Nearly a Senior Poster Featured Poster

@Rshekdar : you're welcome my friend...yes this site is wonderful..just find great time here..enjoy it :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

make your own project, if u get an errors than post it here..

Jx_Man 987 Nearly a Senior Poster Featured Poster

show us your code friend..

Jx_Man 987 Nearly a Senior Poster Featured Poster
textunit.SelStart = Len(textunit.Text)/2
Jx_Man 987 Nearly a Senior Poster Featured Poster

hi realback..
Please do not resurrect old thread..just make your own thread.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you simply can not...a msgbox is a modal window that uses the standard windows system font.
you can manipulate it with use form as your message box..

Jx_Man 987 Nearly a Senior Poster Featured Poster

you want to make some reports?
then you can use Data Report Designer..

Jx_Man 987 Nearly a Senior Poster Featured Poster

what the problem friend?