Click here to Skip to main content
15,911,142 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can I add code to a timer object. Pin
Richard MacCutchan27-May-11 1:19
mveRichard MacCutchan27-May-11 1:19 
AnswerRe: How can I add code to a timer object. Pin
Luc Pattyn27-May-11 1:22
sitebuilderLuc Pattyn27-May-11 1:22 
AnswerRe: How can I add code to a timer object. Pin
Dave Kreskowiak27-May-11 3:37
mveDave Kreskowiak27-May-11 3:37 
AnswerRe: How can I add code to a timer object. Pin
vivek_bhaskar5-Jun-11 18:23
vivek_bhaskar5-Jun-11 18:23 
GeneralRe: How can I add code to a timer object. Pin
Dave Kreskowiak6-Jun-11 1:56
mveDave Kreskowiak6-Jun-11 1:56 
GeneralRe: How can I add code to a timer object. Pin
vivek_bhaskar6-Jun-11 19:54
vivek_bhaskar6-Jun-11 19:54 
GeneralRe: How can I add code to a timer object. Pin
Dave Kreskowiak7-Jun-11 1:12
mveDave Kreskowiak7-Jun-11 1:12 
QuestionHow to Reslove Error? Pin
dongodu25-May-11 3:13
dongodu25-May-11 3:13 
<br />
Option Explicit<br />
Dim DB As ADODB.connection<br />
Dim strString As String<br />
Dim rs As ADODB.recordset<br />
Dim cs As ADODB.connection<br />
Dim ks As ADODB.recordset<br />
Private Const CB_SHOWDROPDOWN           As Long = &H14F<br />
Private Const CB_GETDROPPEDSTATE        As Long = &H157<br />
Private Drop                    As Boolean<br />
Private Const CB_FINDSTRING = &H14C<br />
Private Const CB_SELECTSTRING = &H14D<br />
Private Const CB_LIMITTEXT = &H141<br />
Private Const CB_ERR = (-1)<br />
Private Sub db_conn()<br />
Set DB = New ADODB.connection<br />
<br />
DB.CursorLocation = adUseClient<br />
<br />
DB.Open "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source =" & App.Path & "\Medrar.mdb;"<br />
End Sub<br />
Private Sub cmdAcchu_Click()<br />
Dim obj, rs As ADODB.recordset, SQL As String<br />
<br />
    Set rs = New ADODB.recordset<br />
<br />
    <br />
    Set rs = New ADODB.recordset<br />
    strString = " SELECT cusname,idnumb,mobi,pron,proc,blkno,lannum,sqland,cost,comiso,addit,deduc,gtot,vali,rename" & _<br />
                 " From reser" & _<br />
                 " WHERE reno = '" & Combo1.Text & "' "<br />
<br />
   <br />
    rs.Open strString, DB, adOpenStatic<br />
'    Set rs = db.Execute(strString)<br />
      'With reportPS<br />
       If Not rs.EOF Then<br />
       Set Reservation.DataSource = rs.DataSource<br />
<br />
<br />
'-----------------------------------------------------------------------------------------------'<br />
'PageHeader<br />
Reservation.Sections("PageHeader").Controls("lblcusname").Caption = CStr(rs!cusname)<br />
Reservation.Sections("PageHeader").Controls("lblidnumber").Caption = CStr(rs!idnumb)<br />
Reservation.Sections("PageHeader").Controls("lblmobile").Caption = CStr(rs!mobi)<br />
Reservation.Sections("PageHeader").Controls("lblPron").Caption = CStr(rs!pron)<br />
Reservation.Sections("PageHeader").Controls("lblProc").Caption = CStr(rs!proc)<br />
Reservation.Sections("PageHeader").Controls("lblBlkno").Caption = CStr(rs!blkno)<br />
Reservation.Sections("PageHeader").Controls("lblLn").Caption = CStr(rs!lannum)<br />
Reservation.Sections("PageHeader").Controls("lblsql").Caption = CStr(rs!sqland)<br />
Reservation.Sections("PageHeader").Controls("lblcost").Caption = CStr(rs!cost)<br />
Reservation.Sections("PageHeader").Controls("lbCommi").Caption = CStr(rs!comiso)<br />
Reservation.Sections("PageHeader").Controls("lblAdd").Caption = CStr(rs!Addit)<br />
Reservation.Sections("PageHeader").Controls("lblDed").Caption = CStr(rs!deduc)<br />
Reservation.Sections("PageHeader").Controls("lblGt").Caption = CStr(rs!Gtot)<br />
Reservation.Sections("PageHeader").Controls("lblVali").Caption = CStr(rs!vali)<br />
Reservation.Sections("PageHeader").Controls("lblrname").Caption = CStr(rs!rename)<br />
Reservation.Sections("PageHeader").Controls("lblcname").Caption = CStr(rs!cusname)<br />
Reservation.Sections("PageHeader").Controls("lblvali1").Caption = CStr(rs!vali)<br />
'-----------------------------------------------------------------------------------------------'<br />
<br />
<br />
Reservation.Refresh<br />
Reservation.Show vbModal<br />
<br />
<br />
End If<br />
'End With<br />
<br />
<br />
'For Each obj In reportPS.Sections("PageHeaders").Controls<br />
 '   If TypeOf obj Is RptTextBox Then<br />
  '      obj.DataMember = rs.DataMember<br />
<br />
'End If<br />
'Next<br />
<br />
<br />
End Sub<br />
Private Sub cmdbye_Click()<br />
Unload FrmResPrnt<br />
End Sub<br />
Private Sub Combo1_Click()<br />
Dim cnemployee As New ADODB.connection<br />
Dim rsemployee As New ADODB.recordset<br />
<br />
Call connection(cnemployee, App.Path & "\Medrar.mdb", "endromida")<br />
Call recordset(rsemployee, cnemployee, "SELECT * FROM Reser WHERE Reno ='" & Combo1.Text & "'")<br />
<br />
If rsemployee.RecordCount = 0 Then<br />
MsgBox "The record you requested could not be found.", vbExclamation, "Medrar"<br />
Exit Sub<br />
End If<br />
<br />
With rsemployee<br />
<br />
<br />
End With<br />
<br />
Set cnemployee = Nothing<br />
Set rsemployee = Nothing<br />
End Sub<br />
Private Sub Combo1_KeyPress(KeyAscii As Integer)<br />
Dim t$, rez&, l&<br />
Combo1.SelText = ""<br />
t$ = Combo1.Text & Chr$(KeyAscii)<br />
rez& = SendMessage(Combo1.hwnd, CB_FINDSTRING, -1, ByVal t$)<br />
If rez& <> CB_ERR Then<br />
    l& = Len(t$)<br />
    Combo1.Text = Combo1.list(rez&)<br />
   Combo1.ListIndex = rez&<br />
    KeyAscii = 0<br />
    Combo1.SelStart = l&<br />
    Combo1.SelLength = Len(Combo1.Text) - l&<br />
End If<br />
Dropdown<br />
End Sub<br />
Private Sub Combo1_LostFocus()<br />
Dim t$, rez&<br />
t$ = Combo1.Text<br />
rez& = SendMessage(Combo1.hwnd, CB_FINDSTRING, -1, ByVal t$)<br />
End Sub<br />
Private Sub Dropdown()<br />
   If Drop Then<br />
      If SendMessage(Combo1.hwnd, CB_GETDROPPEDSTATE, 0, ByVal 0&) = 0 Then<br />
         Call SendMessage(Combo1.hwnd, CB_SHOWDROPDOWN, 1&, 0&)<br />
      End If<br />
   End If<br />
End Sub<br />
Private Sub res()<br />
Set cs = CreateObject("Adodb.connection")<br />
cs.Provider = "Microsoft.jet.oledb.4.0"<br />
cs.Open App.Path & "\Medrar.mdb"<br />
Set ks = New ADODB.recordset<br />
ks.Open "Select reno from reser", cs, adOpenKeyset, adLockOptimistic<br />
While Not ks.EOF<br />
    Combo1.AddItem ks.Fields("Reno")<br />
    ks.MoveNext<br />
Wend<br />
ks.Close<br />
Set ks = Nothing<br />
Drop = True<br />
End Sub<br />
Private Sub Form_Load()<br />
Call res<br />
End Sub<br />
<br />

Run Time Error:3709
AnswerRe: How to Resolve Error? Pin
Luc Pattyn25-May-11 3:14
sitebuilderLuc Pattyn25-May-11 3:14 
AnswerRe: How to Reslove Error? Pin
_Erik_25-May-11 3:45
_Erik_25-May-11 3:45 
AnswerRe: How to Reslove Error? Pin
Eddy Vluggen25-May-11 4:31
professionalEddy Vluggen25-May-11 4:31 
QuestionRe: How to Resolve Error? Pin
Luc Pattyn25-May-11 5:38
sitebuilderLuc Pattyn25-May-11 5:38 
GeneralRe: How to Reslove Error? Pin
Dave Kreskowiak25-May-11 6:13
mveDave Kreskowiak25-May-11 6:13 
GeneralRe: How to Reslove Error? Pin
Eddy Vluggen25-May-11 11:41
professionalEddy Vluggen25-May-11 11:41 
QuestionProblem deleting a file (being used by another process) Pin
Central_IT25-May-11 1:55
Central_IT25-May-11 1:55 
AnswerRe: Problem deleting a file (being used by another process) Pin
Dave Kreskowiak25-May-11 3:02
mveDave Kreskowiak25-May-11 3:02 
AnswerRe: Problem deleting a file (being used by another process) Pin
Luc Pattyn25-May-11 3:13
sitebuilderLuc Pattyn25-May-11 3:13 
GeneralRe: Problem deleting a file (being used by another process) Pin
Nagy Vilmos26-May-11 0:15
professionalNagy Vilmos26-May-11 0:15 
AnswerRe: Problem deleting a file (being used by another process) Pin
Luc Pattyn26-May-11 0:22
sitebuilderLuc Pattyn26-May-11 0:22 
QuestionVB.NET Progress status while run a EXE file Pin
Andraw Tang24-May-11 4:26
Andraw Tang24-May-11 4:26 
AnswerRe: VB.NET Progress status while run a EXE file Pin
Dave Kreskowiak24-May-11 4:31
mveDave Kreskowiak24-May-11 4:31 
AnswerRe: VB.NET Progress status while run a EXE file Pin
Luc Pattyn24-May-11 4:37
sitebuilderLuc Pattyn24-May-11 4:37 
GeneralRe: VB.NET Progress status while run a EXE file Pin
Andraw Tang24-May-11 5:10
Andraw Tang24-May-11 5:10 
GeneralRe: VB.NET Progress status while run a EXE file Pin
Andraw Tang24-May-11 6:52
Andraw Tang24-May-11 6:52 
AnswerRe: VB.NET Progress status while run a EXE file Pin
Luc Pattyn24-May-11 7:05
sitebuilderLuc Pattyn24-May-11 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.