652 Posted Topics
Re: Hi, Open the Second form in MODAL form: [code=vb] Form2.Show 1 [/code] Regards Veena | |
Re: Hi, Not sure, try this, change your code: listSeat.Items.Add(sr.ReadLine[b]( )[/b]) Regards Veena | |
Re: Hi, From VB6, just before Viewing the report, Set the DB location for each tables used in the report.. What is your Database..? Access/Oracle/SQL...? Regards Veena | |
Re: Hi, Change your "Do--Loop" code to: [code=vb] Do While Not rs.EOF For j = 0 To rs.Fields.Count - 1 frmReport.MSGrid1.TextMatrix(HSE,j) =IIf(IsNull(rs(j)), "", rs(j)) Next j rs.MoveNext HSE = HSE + 1 Loop [/code] Regards Veena | |
Re: Hi, Use On Error Resume next: [code=vb] Dim sSQL As String On Error Resume Next sSQL = "Create Table EMP(ENo Number(10,0), EName Varchar2(50))" Conn.Execute sSQL [/code] Or, Check for the table name in "TAB" Collection.. [code=vb] Dim sSQL As String Dim RST As New ADODB.Recordset sSQL = "Select * From … | |
Re: Hi, In Procedure, you Have not defined the OUT parameter.. Try this procedure: CREATE PROCEDURE FormatDate(OUT IDate Char(20)) BEGIN SELECT date_format(now(),'%d-%m-%Y') INTO IDate ; END; Regards Veena | |
Re: Hi, When you are showing Form2 in Form1, dont unload it, Just Hide it.. and in form2, show form1 Code in Form1: Me.Hide Form2.Show Code in Form2: Form1.Show Regards Veena | |
Re: Hi, Chage Second part of your code to : [code=vb] PosOfSpace2 = InStr((PosOfSpace1 + 1), cboItems.Text, " ") txtItemValue = Mid(cboItems.Text, PosOfSpace2 + 1) [/code] Regards Veena | |
Re: Hi, Yes, MS Excel can be used as a Database, You can connect it with ADO with the following Connection sring: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""" Regards Veena | |
Re: Hi, Do you have the module..? if yes, then goto menu: Project >> Add Module Select "Existing", tab browse and add Regards Veena | |
Re: Hi, No Events are Fired when the Control is disabled.. But there is a way around, : Place a label on the Form (near to the command button) and in Form's Mouse Move, find the Pointer, if it is hovering over the disabled Command button, then, show the label (as … | |
Re: Hi, Collection has already a [b]Count[/b] property: [code=vb] Dim MyCol As New Collection MyCol.Add "First Item" MsgBox MyCol.Count [/code] What are you actually looking for...? Regards Veena | |
Re: Hi, I guess, you can use this : [code=vb] MsgBox("Selected Rows : " & DataGridView1.SelectedRows.Count.ToString()) [/code] Regards Veena | |
Re: Hi, If you want to Jump to another form, Create a Public Procedure in the new Form, and call the Procedure, write the codes in the new proc. Once the code is executed, the excution point returns to the main form. in Second Form declarae proc like this: Public MyProc … | |
Re: Hi, Write this Code in Main Form: [code=vb] Form2.Show Form2.txtNew.Text = Me.Text1.Text Form2.lblNew.Caption = Me.Label1.Caption [/code] Regards Veena | |
Re: Hi Sonia, [QUOTE=sonia sardana;583050][B][B][COLOR="Red"]1) [/COLOR][/B]In VB,there is no insert ,update,delete statements as in VB.net. [/quote] WRONG... VB6 also supports all DML Statements Connection Object and Command Object has Execute Method, which can be any DML statement: [code=vb] Dim Conn As New ADODB.Connection Conn.Open <My Connection String> Conn.Execute "Insert Into MyTable … | |
Re: Hi, You have to maka a Set-Up file for your project (Using Package and Deployment Wizard) and Install on another system.. Make exe, copy Exe+Database on the the other system and run.. Regards Veena | |
Re: Hi, Try this condition : [code=vb] If Combo1.SelectedIndex = 0 Then ' Code to disable Else ' Code to Enable End If [/code] Regards Veena | |
Re: [QUOTE=sonia sardana;582064] I want only Capital letters are allowed. But the error is coming,Plz help me to sort it out.[/QUOTE] Instead of Blocking Lower case chars, Convert the Lower case chars to upper case: [code=vb] Private Sub Text1_KeyPress(KeyAscii As Integer) KeyAscii = Asc(Ucase(Chr(KeyAscii))) End Sub [/code] Regards Veena | |
Re: Hi, use Sleep API, or Application.Halt Regards Veena | |
Re: Hi, What are you using [b]ADO[/b] or [b]DAO[/b] Regards Veena | |
Re: Hi, A Function Declaration in VB6 is as : [code=vb] Private Function sum(a, b) As Double sum = a + b End Function [/code] Return is the same as Function Name..("Sum" in above case) Regards Veena | |
Re: [QUOTE=sonia sardana;582610]Hi,There is no tab of such name.[/QUOTE] Hi Sonia, In VB6 it is called [b]ToolBar[/b] and it comes with : Microsoft Windows Common Controls 6.0 Regads Veena | |
Re: Hi, Create a Table with "OLE Field" and [b]Databind[/b] the OLE Control on the Vb6 Form to the field.. use a ataControl and ind it.. Add/edit/update /delete will be done automatically Regards Veena | |
Re: Hi, Not sure about this, but you can try.. Instead of Command object.. Try RecordSet object of ADO.. You can Open the recordset in [b]adLockBatchOptimistic[/b] mode (for the Dest DB) , disconnect it from the Database .. Now add all the records.. manipulate records.. and Then Reconnect it to the … | |
Re: Hi, Check this link: [url]http://www.a1vbcode.com/app-3859.asp[/url] REgards Veena | |
Re: Hi, You need to save RichTextbox's "TextRTF" and then retrieve the same .. So all the fomatting is Intact.. REgards Veena | |
Re: Hi, Declare Events for the Connection: Write this at FormLevel : [code=vb] Dim WithEvents MyMsg As ADODB.Connection 'and collect the Events in event: Private Sub MyMsg_InfoMessage(ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pConnection As ADODB.Connection) MsgBox pError.Description End Sub [/code] I have not used, but it is done this … | |
Re: Hi, Reference a "Microsoft Access" Object library in your Project and try this code: [code=vb] Dim MyAcc As New Access.Application MyAcc.OpenCurrentDatabase "C:\MyDb.mdb" , True MyAcc.DoCmd.OpenReport "MyReportName", acViewPreview 'Open Form MyAcc.DoCmd.OpenForm "MyFormname" 'Quit access MyAcc.Quit Set MyAcc = Nothing [/code] Regards Veena | |
Re: Hi, Try this : [code=vb] "Select CI.name,I.ServiceID,P.packagename,P.duration,P.price,I.date,I.timeIn,I.timeOut From CustInfo CI, InDate I, PakInfo P Where CI.CustID = I.CustID And I.ServiceID = P.ServiceID And I.Date Between #" & DtPicker1.Value & "# And #" & DtPicker2.Value & "#" OR " And I.Date Between CDate('" & DtPicker1.Value & "') And CDate('" _ & … | |
Re: Hi, Mastering Visual Basic 6.0 By Evangelos Peutrotsis All series of Teach Yourself VB6 By Sams Publications REgards Veena | |
Re: [QUOTE=Yogesh Sharma;577908]HI, I have made a menu with two menu Items Colors Size. [B]But as u right click on The form in the Client Area, Its hows ViewCode MenuEditor[/B] .[/QUOTE] Hi, I guess, by "Client Area"...? You are talking about [B]Design Time[/B]...? Whatever Menu you have created is shown at … | |
Re: Hi, Write this in FormLoad event: [code=vb] Me.MousePointer = 99 Me.MouseIcon = LoadPicture("C:\windows\cursors\3dgno.cur") [/code] Change the path accordingly Regards Veena | |
Re: Hi, One more Simple way: Add a [b]DriveListBox [/b] on the form and loop thru all the list items.. it lists all the drives Regards Veena | |
Re: Hi, You have to set the Property "MDIChild = True" @ design time. You cannot set it during run-time in VB6 Regards Veena | |
Re: Hi, After Selection of ComboBox, To filter out records use this query: "Select CI.name,I.ServiceID,P.packagename,P.duration,P.price,I.date,I.timeIn,I.timeOut From CustInfo CI, InDate I, PakInfo P Where CI.CustID = I.CustID And I.ServiceID = P.ServiceID And Month(I.Date) = " & (Combo1.ListIndex+1) & " Order By CI.Name" Assuming, Your ComboBox is not sorted and it is in … | |
Re: Hi, UseMnemonic property of Label, when set to False, displays the Text as it is(With all the ampersands). This is very useful when the Label is Bounded to a Datasource on form. when False, It does not have a short cut key. When set to true, It behaves differently.. Say … | |
Re: Hi, Are Controls on your Form locked...? To unlock, Right-Click on Form (anywhere) and Click on menu :Unlock Controls Regards Veena | |
Re: Hi Sonia, To select an Item in ListBox, Which is in Textbox , use : [b]List1.Text = Text1.Text[/b] If text1.Text is found in the ListBox, That Item is selected/highlighted, or else, if not found then, No item in Listbox is selected.. Regards Veena | |
Re: Hi, [b]ActiveForm[/b] refers to Active Child Form of the MDI Form. In your project make both the form's as Child of the mdi form, by seting [b]MDIChild=True[/b] Regards Veena | |
Re: Hi, Right Click on [b]Edit [/b] menu, and Check the [b]Edit[/b] Button Toolbar for edit is inserted in VB IDE Regards Veena | |
Re: Hi, I guess, you want the code for "DataList" box control..: add a "DataList" control on the form and set these Properties..: RowSource = ADODC1 ListField ="MyFieldName" BoundColumn = "MyFieldName" if you dont have ADODC, then @ runtime, you can open a recordset and set rowsource to that ADOrecordset Regards … | |
Re: Hi, Say, you want to lock the Computer, if there is no activity for 5 mins continus.. then you need to have a Timer. Timer's Interval is 1000 ms(1 sec) By Default Timer is enable all the time. Declare a FormLevel Variable MyVar as Integer. Make Form's property Keypreview=True. In … | |
Re: Hi DragonHeart, While Installing CR11, you need to Install with the [b]Developer Key [/b] not the designer/liscence key.. and there is no Report Control, You have a Report Viewer here. You need to add a CRViewer Control on the form, Prepare a report and View it.. [code=vb] Dim CrApp As … | |
Re: Hi, In 6th line, you need CustomerInfo.AddNew (To add new data) You dont require that, if you are Editting the last record. And as Shouvik, said, Multi-step error is due to Field data type differences. It is always a good Idea to Set MaxLength property of the Textbox. Regards Veena | |
Re: Hi, the problem is, you have not mentioned Array's Index , Try this : col_values.add var_list1(2), "k" Also check Key (k) should be Unique in the Collection. What is the error..? Regards Veena | |
Re: Hi, Check this code: [code=vb] Dim InDate As Date Dim NewDate As Date InDate = Format(txtIn, "hh:mm:ss") NewDate = DateAdd("n", Val(txtDur), InDate) txtOutTime = Format(NewDate, "hh:mm") [/code] Regards Veena | |
| |
Re: Hi, If MSChart then, you can also use : MSChart1.ToDefaults Regards Veena | |
Re: Hi Keep 2 Form Level Variables: Difference Shown is in Seconds Divide By 60 and Convert to Minutes. [code] Dim StartTime As Date Dim EndTime As Date ' Private Sub cmdStart_Click() StartTime = Now End Sub ' Private Sub cmdEnd_Click() EndTime = Now MsgBox DateDiff("s", StartTime, EndTime) End Sub [/code] … |
The End.