2,383 Posted Topics

Member Avatar for romz

If you want to know how many rows are selected then [iCODE]DataGrid1.SelBookmarks.Count[/iCODE] works great to me.

Member Avatar for Jx_Man
0
797
Member Avatar for gruffy321

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]

Member Avatar for gruffy321
0
130
Member Avatar for bastardi
Member Avatar for uselessninja
Member Avatar for dnk

[QUOTE]i already make it scrolling [/QUOTE] Post the code..how far you doing this.

Member Avatar for dnk
0
231
Member Avatar for jemz

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?

Member Avatar for jemz
0
116
Member Avatar for Vega_Knight

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 …

Member Avatar for Jx_Man
0
183
Member Avatar for deadelgabar

[CODE]If Me.PASSWORD.Value = DLookup("password", "tblEmployees", "[username]=" & Me.Combo0.Value) Then[/CODE]

Member Avatar for Jx_Man
0
209
Member Avatar for dnk

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]

Member Avatar for dnk
0
173
Member Avatar for PM312

So you want to get data from grid to One Textbox only? Post your code how far you doing this?

Member Avatar for Jx_Man
0
1K
Member Avatar for PM312
Member Avatar for padmak

[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]

Member Avatar for rajasekar646
0
413
Member Avatar for anand4886

[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.

Member Avatar for pankeel
0
94
Member Avatar for jemz

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 …

Member Avatar for Jx_Man
0
693
Member Avatar for romz

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]

Member Avatar for romz
0
5K
Member Avatar for alexaaxela

[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 …

Member Avatar for Jx_Man
0
88
Member Avatar for BleepyE

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.

Member Avatar for BleepyE
0
143
Member Avatar for Naruse
Member Avatar for zebnoon
Member Avatar for zebnoon
0
110
Member Avatar for jemz

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 …

Member Avatar for jemz
0
3K
Member Avatar for ashapbhalerao

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. :)

Member Avatar for Jx_Man
0
157
Member Avatar for Phil2:3

[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?

Member Avatar for Jx_Man
0
120
Member Avatar for zebnoon
Member Avatar for dnk

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 = …

Member Avatar for dnk
0
3K
Member Avatar for akaban

[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 …

Member Avatar for Jx_Man
0
491
Member Avatar for Naruse
Member Avatar for vb6lover

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.

Member Avatar for smith.mitchell7
0
131
Member Avatar for uchendu korie

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]

Member Avatar for Luc001
0
183
Member Avatar for sarifah n
Member Avatar for Sturdy

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 …

Member Avatar for Sturdy
0
156
Member Avatar for raffy3
Member Avatar for ryan311
Member Avatar for bonzo2008

I can't understand clearly. post more information. Post the code you've been work.

Member Avatar for WaltP
0
139
Member Avatar for Sturdy

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]

Member Avatar for Jx_Man
0
464
Member Avatar for CitizenSnips
Member Avatar for Jx_Man
0
161
Member Avatar for Jaseem Ahmed
Member Avatar for shilp

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]

Member Avatar for tomato.pgn
0
192
Member Avatar for Shizuka

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.

Member Avatar for Jx_Man
0
286
Member Avatar for november_pooh

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 …

Member Avatar for Jx_Man
0
356
Member Avatar for Ravi.Srilatha
Member Avatar for debasisdas
0
97
Member Avatar for arezz09
Member Avatar for vinothmca

You put the item on text box? Put it on listbox. it make you easier to input multiple data on listview.

Member Avatar for Jx_Man
0
67
Member Avatar for arezz09

[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 …

Member Avatar for Jx_Man
0
166
Member Avatar for androidz
Member Avatar for Sturdy

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 …

Member Avatar for Sturdy
0
5K
Member Avatar for cindy s

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 …

Member Avatar for dspnhn
0
191
Member Avatar for bondi007

[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..

Member Avatar for Jx_Man
0
133
Member Avatar for eileenc87

[CODE]Dim Myds as New DataSet Dim Mycmd As New SqlCommand(YourSQLQuery, YourConnection) Dim Myda As New DataAdapter(Mycmd) Myda.fill(Myds)[/CODE]

Member Avatar for arezz09
0
241
Member Avatar for ridzaq

change your field name with another name.. This may happen because login word already taken by the system.

Member Avatar for ridzaq
0
2K
Member Avatar for Jaseem Ahmed

The End.