- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 51
- Posts with Upvotes
- 48
- Upvoting Members
- 35
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
652 Posted Topics
Hi, Take a Look at this thread: [url]http://www.daniweb.com/forums/thread65252.html[/url] Regards Veena
Hi, Yes, Client_ID's should be Unique. But still if, you want to renumber them, Change your code to : [CODE] Public Sub generateid() Dim i As Integer i = 1 If rs.State = 1 Then rs.Close rs.Open "clientdetails", admincon, adOpenDynamic, adLockOptimistic Do While Not rs.EOF rs("Client_ID") = i rs.Update i …
Hi, Keep the Cursor in a TextBox and click the button on the BarCode Reader or Shoot the BarCode Gun, The Text/Alphanumeric Equivalent of the Bar Code is displayed in the TextBox. Provided u have properly installed all the .dll's of the BarCode reader given to u by the vendor. …
Hi, Before showing the report just Refresh it..: [code] DataReport1.Refresh DataReport1.Show [/code] Regards Veena
Hi, write this code in Command Click event: [code] [COLOR=green]If[/COLOR][COLOR=green] RadioButton1.Checked = [/COLOR][COLOR=green]True[/COLOR][COLOR=green] Or RadioButton2.Checked=True [/COLOR][COLOR=green]Then[/COLOR] [COLOR=green] Form1.Show[/COLOR] [COLOR=green]Else[/COLOR] [COLOR=green] Form2.Show[/COLOR] [COLOR=green]End if[/COLOR] [/code] Regards Veena
Hi, Try to Install Crystal Reports 4.6 seperately... Note: if there is higher version of CR installed in the system, CR4.6 may not get installed... Regards Veena
Hi, You dont need a recordset to execute.. change 16 an 17 line to one line... cn.Execute strsql Regards Veena
Hi, u can also [URL="http://aspalliance.com/articleViewer.aspx?aId=138"]check this[/URL] Regards Veena
Hi, After Do While Not .EOF @ Line 21, write : `r = r + 1` Regards Veena
Hi, Save the Index of the label Control, in the Tag Property... Write this line at Line 16 `lbl.Tag = x` In Click Event.. and to get the Index, use: `MsgBox(CType(sender, Label).Tag)` Regards Veena
Hi, Try this : ` GroupBox2.Visible = True` ` GroupBox1.Visible = False` ` TextBox1.Focus()` Regards Veena
Hi, Change this line: `Dim search1 As String = "'%" & string1 & "%'"` Keep a BreakPoint on this line... "cmd.CommandText" and check the SQL Query... Regards Veena
Hi, Looks like... "xlApp" is an Application Object.. and "Sheets" is not immediate properlty... You have to check for.. `xlWorkBook.Sheets.Count` Change the workbook, variable name accordingly.. and also, make sure, it is declared in the same procedure or declared Module Level... and it has to be opened, before checking sheets.count... …
Hi, Write this in Form1's button click event: `Form2.Lable1.Caption = "<My Caption>"` Regards Veena
Hi, Combined with lat_upd, You can Select using Order By RowID.. RowID is unique for each row... Regards Veena
Hi, Readers, always have to be closed... After "End While".. write this : `Reader.Close()` Regards Veena
Hi, For VB6, Post your query In "Visual basic 4/5/6" Group... In VB6, You cannot declare and assign Value in same statement... Change your code to: Dim i as integer i =1 If its a Contant.. Const i As Integer =1 Regards Veena
Hi, Dont directly bind to the ListBox control.. Populate items to it, using SQL Reader.. and then you can add listitems, as and when required.. Regards Veena
Hi, Also, you have to post Sample data, which you are recieving from the Serial CommPort... Regards Veena
Hi, Try This: TextBox1.Text = DateTimePicker2.Value.ToString("dd/mm/yyyy") Regards Veena
Hi, You can hide... Dim TPage As TabPage TPage = TabControl1.TabPages(2) TabControl1.Controls.Remove(TPage) If you want to readd the tab page.. You can check the full coding here : http://social.msdn.microsoft.com/forums/en-US/winforms/thread/89053adf-7875-4db9-b328-460a7b1f97c0 Regards Veena
Hi, You are getting the error, because, you have not populated the connection string for the connection... call the function getConnect.. and open the connection... Connect.GetConnect() Conn.Open() Regards Veena
Hi, Like ReverendJim says.. change the SQL statement.. write "Where and filedname..." CMD = New SqlCommand("select * from table_name WHERE Field_Name =#" _ & Format(from_date, "yyyy-MMM-dd") & "# ", CON) Regards Veena
Hi, Write this in Lost Focus, of the TextBox... Dim SpFlg As Boolean Dim i As Integer Dim TAsc As Integer Dim TChar As String Dim TNewText As String SpFlg = False TNewText = "" For i = 1 To Len(Text1.Text) TChar = Mid(Text1.Text, i, 1) TAsc = Asc(TChar) If …
Hi, Place the Database in the same folder as the project/application... and wrire this code in form_load..: Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path _ & "\MyDB.mdb ;Persist Security Info=False" Adodc1.Refresh change database name accordingly.. bind all the controls, in runtime.. not design time... Regards Veena
Hi, In your table, what type of field is "purchase_date"...? If it is a Date field, you dont have to use "Like" operator.. you need to query using Date Functions... What database it is..? Access..? MSSQL..? Oracle..? Regards Veena
Hi, In Property pages of Text1 .. MaxLength = 3 write this code, in Validate Event of textbox Private Sub Text1_Validate(Cancel As Boolean) If Val(Text1.Text) > 0 And Val(Text1.Text) <=100 Then Else Cancel = True End If End Sub Regards Veena
Hi, Try using Month(AttendanceDate) "Select COUNT(DayShift) FROM Attendance WHERE AttendanceStatus = 6 AND " _ & " Month(AttendanceDate) = " & Month(DateTimePicker1.Text) & " AND Firstname ='" _ & Firstname_txt.Text.Trim & "';" Regards Veena
Hi, Your SQL statement contains "roomType.roomType" Make sure, "roomType" Table, has "roomType" Column Name Regards Veena
Hi, What you can do is.. Add one more ListBox, and add all the names from database into that list box.. In Change event of combobox, clear combobox.. and loop thru the Listbox, add items to combo box with like condition... Regards Veena
Hi, Change the property Setting for ListView: LabelEdit = 1 -lvwManual Regards Veena
Hi, Wrap date Column, with # rsReport1.Open "Select purchase_date, BarCode, Price, ProductName, Quantity, TotalPrice From Dailyrecord where purchase_date = #" & DTPicker1.Value & "# ", acd, adOpenForwardOnly Regards Veena
Hi, To handle Null fields.. use ".ToString", at the end.. However.. You can Simplify your code this way as well..... Private Sub cmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNext.Click Dim CorrAns As String Dim UserAns As String ' UserAns = "" If RadioButton1.Checked = True Then UserAns …
Hi, First Line, Declare RS as New.. 20th Line, remove Exit Sub and no need of ADO.. DataControl.. Check the modified code: Private Sub Command2_Click() Dim rs1 As New ADODB.Recordset Dim rs As New ADODB.Recordset Dim sTrID As String Dim Total As Integer Dim xhours As String Dim Intime As …
Hi, I have added all the data to the ListBox, and compiled it this way... Check the Code: Private Sub Command1_Click() Dim i As Integer Dim x As Single Dim y As Single Dim TStr As String i = 0 x = List1.List(i) y = 0 Do i = i …
Hi, Try something like this... "Select IIF(IsNull(MyFldName), 0, MyFldName) From MyTable" Regards Veena
Hi, I Guess DataWS is not set to the referring Worksheet... Try this : [code=vb] With WS.CharObjects(SelChart).Chart With .SeriesCollection(1) .XValues =Sheets("Sheet1").Range("A1:A101") .Values = Sheets("Sheet1").Range("B1:B101") End With End With [/code] Regards Veena
Hi, First Populate Combo1 with all the Available info, Write this in Form Load: [code=vb] Dim RS As New ADODB.RecordSet Dim sSQL As String Combo1.Clear sSQL="Select * From Table1 " RS.Open sSQL,Conn Do While Not RS.EOF Combo1.AddItem RS("Description") & "" Combo1.ItemData(Combo1.NewIndex) = Val(RS("ID") & "") RS.MoveNext Loop RS.Close [/code] In …
Hi, Try from connection string: [url]http://www.connstr.com/connectionstrings.aspx[/url] Regards Veena
Hi, isnt it a spelling mistake of the field: WHERE Date_Registred should be: WHERE Date_Registered Regards Veena
Hi, or else, LostFocus of Text1, write this code: Text1.Text = StrConv(Text1.Text, vbProperCase) and check for "Red" Regards Veena
Hi, Change Line Number 26: > .Rows = .Rows - 1 make it: .Row = .Rows - 1 Regards Veena
Hi, You need to create a Batch file and shell the batch file... something like this : Dim FN As Integer FN = FreeFile Open "C:\Mybatc.bat" For Output Print #FN, "<YOUR DOS COMMAND HERE>" Print #FN, "Exit" Close #FN AppActivate Shell("C:\Mybatc.bat") Regards Veena
Hi, Change the code to: Dim RS As New Adodb.Recordset Dim con As New Adodb.Connection Private Sub mygdb() Set con = New Adodb.Connection con.CursorLocation = adUseClient con.Open "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source =" _ & App.Path & "\enrolment.mdb;" End Sub Regards Veena
Hi, Try this : " {tblname.datetimefield} In Date(" & format(text1,"yyyy,mm,dd") & ") " _ & " To Date(" & format(text2,"yyyy,mm,dd") & ") " Regards Veena
Hi, Applications what I Work, has got some 400 (Forms+modules+classes), We have never faced such Out of Memory issue.. May be, because, the system I work is with the latest Configuration, Good Memory and high RAM. The best part is we use external Crystalreports.. So no need to embed reports …
Hi, Check this : http://www.officekb.com/Uwe/Forum.aspx/word-vba/20963/How-to-code-Word-2007-shortcut-keys-using-VBA Regards Veena
Hi, Try this : Selection.NumberFormat = "#,##0.00" Regards Veena
Hi, You have to use "%" around the text like this.... rs.Open "select * from books where title like '%" & Text12 & "%' ", cnn, adOpenStatic, adLockPessimistic Regards Veena
Hi, Code you are using is for Higher Versions... For CR4.6, Add Crystal Reports OCX Control on the Form. And Use This Code: With CrystalReport1 .ReportFileName = App.Path & "\MyRpt.Rpt" .Action = 1 End With Regards Veena
The End.