2,383 Posted Topics
Re: If you want to know how many rows are selected then [iCODE]DataGrid1.SelBookmarks.Count[/iCODE] works great to me. | |
Re: Change combo box Event from Combo1_Change() to Combo1_Click() : [CODE]Private Sub Combo1_Click() Select Case Me.Combo1 Case "bob" Me.Combo2.Enabled = True Case "carol" Me.Combo2.Enabled = True Case "jeff" Me.Combo2.Enabled = False Case "freeda" Me.Combo2.Enabled = False Case Else ' this for case else Me.Combo2.Enabled = False End Select End Sub[/CODE] | |
Re: Its working to me..I run your codes and i got string with commas inside. | |
Re: what exactly do you want here?? how far you doing this? | |
Re: [QUOTE]i already make it scrolling [/QUOTE] Post the code..how far you doing this. | |
Re: i don't understand correctly. You want to add it (active or not active) to database or just for temporary only? Do you have a field for it on database? | |
Re: You mean system directory? See if this helps : [CODE] Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long Private Sub Form_Load() Dim sSave As String, Ret As Long sSave = Space(255) Ret = GetSystemDirectory(sSave, 255) sSave = Left$(sSave, Ret) MsgBox … | |
Re: [CODE]If Me.PASSWORD.Value = DLookup("password", "tblEmployees", "[username]=" & Me.Combo0.Value) Then[/CODE] | |
Re: Why not use StrConv() See if this helps : [CODE]Private Sub txtQuote_Change() txtQuote.Text = StrConv(txtQuote.Text, vbProperCase) txtQuote.SelStart = Len(txtQuote.Text) End Sub[/CODE] | |
Re: So you want to get data from grid to One Textbox only? Post your code how far you doing this? | |
Re: you mean to change textbox font type? | |
Re: [code] Dim button As DialogResult button = MessageBox.Show _ ("Are you sure you want to exit this application?", _ "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) If button = Windows.Forms.DialogResult.Yes Then Me.Close() Else 'Do Nothing End If[/code] | |
Re: [QUOTE]i am able to add items in listview at runtime ,but not able to add this items and subitems in database pls help me in code [/QUOTE] Use looping to read items and subitems from listview and add each of it to database. | |
Re: See if this helps. Actually when you add data it added in the last. So, you just simply select the last data on listview : [CODE] Private Sub cmdadd_Click() sql = "INSERT INTO Customer(id,Name,familyName,Address) VALUES('" & lngId & "','" & txtname & "', '" & txtfamilyname & "','" & txtaddress … | |
Re: This following code to get data from datagrid.. [CODE] DataGrid1.Row = 0 ' first row.. just looping as many of datagrid rows DataGrid1.Columns(0).Value DataGrid1.Columns(1).Value DataGrid1.Columns(2).Value [/CODE] | |
Re: [QUOTE=alexaaxela;1551745]Hi guys, basically im writing a program where the user inputs the number of coffees they require from a number of drop down boxes, one for cappucino, espresso, iced coffee and latte. after this, there is a 'calculate' button which totals these up and displays them in a textbox. my … | |
Re: I don't understand correctly what do you want here. You mean to add data into table of database? if i right then use Insert statment to add data. Datagrid is using for display data on database. | |
Re: Show us your effort. how far you doing this? Just post your code and we try to helps you. | |
Re: Try This : [CODE]Option Explicit Private Sub Form_Load() ConnectToDB Call ColumnName(lvwStud, "First Name", 40, "Last Name", 40, "Address", 70) End Sub Private Sub ColumnName(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 … | |
Re: Hi ashapbhalerao,, [URL="http://www.daniweb.com/forums/newthread.php?do=newthread&f=4"]Please create your own thread here[/URL] do not hijact another thread and rise old thread. Thank You. :) | |
Re: [QUOTE]My poor attempt thus far: [CODE]Sub FillRange() Num = 0 For row = 1 To 10 For col = 1 To 10 Sheets("Sheet1").Cells(row, col).Value = Num Num = Num + 1 Next col Next row End Sub [/CODE] [/QUOTE] Any error here? Is this your all code? | |
Re: Use Mid function to search space in text box: [CODE]Private Sub Command1_Click() Dim Counts As Integer If Text1.Text = "" Then Counts = 0 Else Counts = 1 For i = 1 To Len(Text1.Text) If Mid(Text1.Text, i, 1) = " " Then ' use Mid to search space Counts = … | |
Re: [QUOTE]i need to run program when computer starts. i m trying this [CODE]Shell "schtasks /create /sc onstart/tn autoonoff/tr D:\old files\Vb Projects\Auto Shut n Restart\Project1.exe" [/CODE] i m administrator but want to make this for both administrator and user. operating system where this program will run is Xp sp2 [/QUOTE] you … | |
| |
Re: First, you are kind of lazy one. [URL="http://www.daniweb.com/forums/announcement58-2.html"]We only give homework help to those who show effort.[/URL] Visit [URL="http://forum.codecall.net/tutorials/9900-how-make-easy-web-browser-vb6.html"]this site[/URL] and [URL="http://www.vbforums.com/showthread.php?t=406671"]this site[/URL] to see tutorial to make web browser with vb6. Or Do some googling to find something out. | |
Re: Try this : [CODE] Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = Now.Hour & ":" & Now.Minute & ":" & Now.Second End Sub [/CODE] | |
| |
Re: If you have array textboxes then you can use looping to clear text box : [CODE] Dim i as Integer For i = 0 to 10 txt(i).Text = "" Next [/CODE] Or you can check if the type of control is text box then clear the control text. [CODE] For … | |
Re: Set true or false. | |
Re: Clear it before. [CODE]ComboBox2.Items.Clear()[/CODE] | |
Re: I can't understand clearly. post more information. Post the code you've been work. | |
Re: Try this : [CODE]Private Sub Timer1_Timer() TCount = TCount - 1 Label1.Caption = TCount If TCount = 0 Then Msgbox "Time's UP!" End If End Sub[/CODE] | |
Re: You didn't need "do..loop" in calc button click event. Just remove it. | |
| |
Re: you need to declare form name as object and use it to call that form. ex : [code]dim Dani as new Form2 Dani.show[/code] | |
Re: Hi, Get the path using opendialog control, then save the path to database. When you want to show it, just load from database and show it using picture box. Just it. | |
Re: There are many way to accomplish this. See if this help : [CODE]' Get a free file number nFileNum = FreeFile ' Open a text file for input. inputbox returns the path to read the file Open "D:\test.txt" For Input As nFileNum lLineCount = 1 ' Read the contents of … | |
Re: first, how you design your database? what fields that you have? | |
| |
Re: You put the item on text box? Put it on listbox. it make you easier to input multiple data on listview. | |
Re: [QUOTE]how to make datagrid automaticly load data form database after insert new data..data grid only load after i relaunch my application...do i need create refresh button or anything else??[/QUOTE] I suggest to make a function to preview data. so you can call it anywhere. after insert, edit or delete data … | |
Re: andre already answered it..it should works for you :) | |
Re: as debasisdas said, use common dialog control First you need to add the component: * Project > Components * On the Controls tab, choose Microsoft Common Dialog Control 6.0 (SP6) Now on your form, add the new Common Dialog control from the toolbox this following code to use common dialog … | |
Re: because you set Flag to True. After first looping program will check the flag state is true or false, but program get your flag is true then program will stop to read data.. pick your flag out of looping. [CODE]Do While (Not foundFlag) And (Not datBooks.Recordset.EOF) If UCase(datBooks.Recordset.Fields("Author").Value) = strSearchFor … | |
Re: [QUOTE]I am currently using Visual Basic Pro 2010, if someone could assist me on my coursework it will be appreiciated. [/QUOTE] Actually if you post in right section (i mean in vb.net section), you will get more advice there.. | |
Re: [CODE]Dim Myds as New DataSet Dim Mycmd As New SqlCommand(YourSQLQuery, YourConnection) Dim Myda As New DataAdapter(Mycmd) Myda.fill(Myds)[/CODE] | |
Re: change your field name with another name.. This may happen because login word already taken by the system. | |
Re: add rs.update after each combo box. |
The End.