652 Posted Topics

Member Avatar for sumit-saini

Hi, use KILL: [code=vb] If Dir("C:\MyText.txt") <> "" Then Kill "C:\MyText.txt" End If [/code] Regards Veena

Member Avatar for Comatose
0
316
Member Avatar for sal21

Hi, Try This : Code is easy for ListBox.. If you want To Poulate a Combo Only, Then Place a ListBox on the Form and Set it's property Visible = False [code=vb] Dim str1 As String RS.MoveFirst List1.Clear Combo1.Clear Do While Not RS.EOF str1 = RS("MyField") & "" List1.Text = …

Member Avatar for QVeen72
0
101
Member Avatar for Ravi Kant

Hi, Once the [B]Grid is Loaded, [/B] Loop thru the column and Highlight if matching, Say, you are Date Column is 2, Check this Code: [code=vb] Dim i As Integer For i = 1 To Grd.Rows-1 If ISDate(Grd.TextMatrix(i,2)) Then If CDate(Grd.TextMatrix(i,2)) = Date Then Grd.Col = 2 Grd.Row = i …

Member Avatar for QVeen72
0
132
Member Avatar for RahulV

Hi, Using ADO, Create Database at Runtime.. Check this thread: [url]http://www.daniweb.com/forums/thread118188.html[/url] Regards Veena

Member Avatar for RahulV
0
76
Member Avatar for Breez

Hi, Set TABINDEX property for all the controls on your form starting from 0. When you hit TAB, automatically, control with next tab index, gets the focus.. Regards Veena

Member Avatar for gurshan
0
133
Member Avatar for 4ukh

Hi, In Access Value for High / True is [B][COLOR="Red"] -1[/COLOR][/B] so change this to : [code=vb] If cg_p_chk.Value = vbChecked Then cg_p_chk = -1 Else cg_p_chk = 0 End If [/code] So, While Getting Records back, Check for 0 [code=vb] If RS("MyCheckField") = 0 Then MyCheckBox.Value = vbUnChecked Else …

Member Avatar for Teme64
0
124
Member Avatar for PK GOYAL

Hi, Use [B]DateDiff[/B] function: dim t as integer t = DateDiff("d",cdate("19-10-1983"),cdate("30-09-2008")) You will get difference in Days, Replace d with yyyy for years m for month.. OR divide t by 12 to get years.. Regards Veena

Member Avatar for QVeen72
0
98
Member Avatar for dinilkarun

Hi, Just an Alternative Suggestion.. Why Not Use a MSFlexGridControl.. Add a Grid Control and rename it as "GRD" And in FormLoad, Write This Code: [code=vb] Dim i As Integer Me.Grd.Rows = 16 Me.Grd.Cols = 2 For i = 1 To 15 Me.Grd.Row = i Me.Grd.Col = 0 Me.Grd.Text = …

Member Avatar for QVeen72
0
277
Member Avatar for wookinhung

Hi, Yes, there is a Limitation of Procedure Size, in VB6.. Looking at your code, appears, there is a Lot of Repeatation, say for example, this part : [code=vb] ElseIf txt7 > 0 Then lblItem6 = "W7~ John Doe" lblItemprice6 = "10.50" lblItemquantity6 = txt7 lblTotal6 = TotW7Price [/code] Is …

Member Avatar for QVeen72
0
113
Member Avatar for wookinhung
Re: HELP

Hi, In Form Load of Form2, write this code: Me.Text1.Text = Form1.Text1.Text (Here you have to show Form2, While Form1, is still Loaded) OR In Lost Focus of Form1's Text1, Form2.Text1.Text = Me.Text1.Text OR Keep a Public Variable in .bas module, populate variable in Form1's Text_lostfocus event, and Access that …

Member Avatar for wookinhung
0
93
Member Avatar for firoz.raj
Re: Help

Hi, You need to Remove the DISTINCTROW. Any way, you are grouping on Product_id, you dont need a Distinct.. Try this Query for PartDetail: [code=vb] Select Item_Code, ProductName, Max(ID) As MaxID, Sum(Qty) As MaxQty, Max(Unit) As ProUnit From Production Group By Item_Code, ProductName [/code] Regards Veena

Member Avatar for firoz.raj
0
239
Member Avatar for jacko168

Hi, Remove the Single Quotes around Combo selection.. [code=vb] dim strSQL As String strSQL = "SELECT tblMain.ID, tblMain.Type, tblMain.Site, " _ & " tblMain.Room, tblMain.Area, * FROM tblMain WHERE " _ & " (((tblMain.Type) Like "*" & Forms!frmMain!Search2 & "*")) Or " _ & " (((tblMain.Site) Like "*" & Forms!frmMain!Search2 …

Member Avatar for jacko168
0
308
Member Avatar for ryan311

Hi, You can write using any of the LOOP Structures, You already know the Algorithm.. so what is the problem..? Regards Veena

Member Avatar for aktharshaik
0
110
Member Avatar for firoz.raj

Hi, Place a CommandButton "Populate" in the Frame, Initially, Make Grid2.Rows = 1. Select a Row, in First Grid, and Click On "Populate", write this code for commandClick. [code=vb] Dim i As Integer If Grid1.Row > 0 Then Grid2.Rows=Grid2.Rows+1 With Grid2 .TextMatrix(.Rows-1, 0) = Grid1.TextMatrix(.Row,0) .TextMatrix(.Rows-1, 1) = Grid1.TextMatrix(.Row,1) .TextMatrix(.Rows-1, …

Member Avatar for firoz.raj
0
154
Member Avatar for dinilkarun

Hi, Try This Code: [code=vb] With ppSlide1.Shapes(3) .TextFrame.TextRange.Text = "Wing PRR :Total Weight: " .TextFrame.TextRange.Characters(Start:=1, Length:=9).Font.Color.RGB = RGB(255, 0, 0) .TextFrame.TextRange.Characters(Start:=10, Length:=12).Font.Color.RGB = RGB(0, 0, 255) .TextFrame.TextRange.Font.Bold = True .TextFrame.TextRange.Font.Color = vbWhite .TextFrame.TextRange.Font.Size = 26 .TextFrame.TextRange.Font.Name = "Arial" End With [/code] Change RGB Accordingly.. Regards Veena

Member Avatar for QVeen72
0
467
Member Avatar for smile4evr

Hi, There is another on-going thread for datareport, I have posted a Solution in Page1 Check this : [url]http://www.daniweb.com/forums/thread155025.html[/url] Regards Veena

Member Avatar for smile4evr
0
128
Member Avatar for 4ukh

Hi, In Access, you need to store [B]-1 [/B]value for Checked, and [B]0[/B] for UnChecked Regards Veena

Member Avatar for 4ukh
0
110
Member Avatar for Zermoth

Hi, use [B]SLEEP[/B] API Declare this at the top of the Form's Code window (After Option Explicit) [code=vb] Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'To Pause/Sleep for 10 seconds, write this code: Sleep(10000) [/code] Regards Veena

Member Avatar for Zermoth
0
116
Member Avatar for jaasaria
Member Avatar for jaasaria
0
94
Member Avatar for ariesL

Hi, You need to Split the Text into 2 Parts, and then Sort it.. Numeric Part should be formatted with Appropriate Zeros in Between.. Data need to be like this:... Data001 Data002 Data003 Data010 Data012 Data100 If you know how many distinct TextParts you have, Then Loop thru the ListBox, …

Member Avatar for ariesL
0
331
Member Avatar for sowmyav

Hi, Open your Project, and goto menu : File>> Make Project1.exe Select the path for the exe, thats all.. Regards Veena

Member Avatar for ryan311
0
106
Member Avatar for yuleball

Hi, Try This Code : [code=vb] Dim MyStr As String Dim TotRTF As String Dim MyText As String ' MyText = "MYTEXTBOX" MyStr = "\par \trowd\trgaph108\trleft36\cellx1636\pard\intbl " MyStr = MyStr & MyText & "\cell\row\pard\par" With RTB .SelText = Chr(&H80) TotRTF = .TextRTF TotRTF = Replace(.TextRTF, "'80", MyStr) .TextRTF = TotRTF …

Member Avatar for QVeen72
0
106
Member Avatar for dinilkarun

Hi, Try This : [code=vb] Dim j As Integer Dim NewStr As String j = InStr(status_array(i), Format(Now(), "mm-dd-yyyy")) If j <> 0 Then NewStr = Mid(status_array(i), j) End If [/code] Regards Veena

Member Avatar for QVeen72
0
79
Member Avatar for Soleybancing

Hi, Try This : Open a Data Project Add a Connection Object (Configure to your database) Add A Command Object (Say Command1) And Right-Click Goto properties and Select Option SQL Statement and Type : Select * From MyTable Where MyDate Between ? And ? Click on Apply, Parameter Tab Is …

Member Avatar for QVeen72
0
363
Member Avatar for kamsuk

Hi, You have 2 Options.. Create Small BMP files with all the Font Requires, and Load the Pictures on the Command Button.. Use RichTextBox, instead of Label and TextBox.. Regards Veena

Member Avatar for aktharshaik
0
921
Member Avatar for ryan311

Hi, Change your code to : [code=vb] If KeyAscii <> 8 Then if keyascii >= 48 and keyascii <= 75 then exit sub else keyascii = 0 end if End If [/code] Regards Veena

Member Avatar for ryan311
0
162
Member Avatar for VB6Beginner
Member Avatar for 4ukh

Hi, Try This Query: Select TMonths, Date(), DateAdd('m',TMonths,Date()) From MyTable Replace TMonths with your Numeric value/FieldName Regards Veena

Member Avatar for 4ukh
0
79
Member Avatar for singoi

Hi, Try This : [code=vb] msf1.ColWidth(0) = 400 msf1.ColWidth(1) = 1000 msf1.ColWidth(2) = 1200 msf1.ColWidth(3) = 1200 msf1.ColWidth(4) = 1500 [/code] With a little bit of judgement, you can do it.. Regards Veena

Member Avatar for QVeen72
0
1K
Member Avatar for Moselekm

Hi, VB.net have different File Objects.. Check this [URL="http://www.startvbdotnet.com/files/default.aspx"]Link Here[/URL] Regards Veena

Member Avatar for QVeen72
0
91
Member Avatar for pentahari
Member Avatar for nor_d83

Hi, If the field you are trying to SEEK is a String, then you have to wrap the search string with single quotes.. Also, SEEK works if the Recordset is open in TABLE mode, and INDEX has been defined.. Data1.Recordset.Seek "=", "'" & SearchStr$ & "'" Regards Veena

Member Avatar for nor_d83
0
172
Member Avatar for abu taher

Hi, An Easier way out is Control arrays.. In a New Form, Place a CheckBox Control on the from from the tool box, copy and Paste, VB will ask if you want to create control array, say yes, add 12 Times, all of them will have a same name, but …

Member Avatar for kain_mcbride
0
143
Member Avatar for sacarias40

Hi, Not Clear.. What does Same Variable mean..? Do you want to get Selected Item of the ComboBox in Some Variable..? MyVar = Combo1.Text Regards Veena

Member Avatar for sacarias40
0
102
Member Avatar for hamed.rahimian

Hi, Try to Create Parameters like this : [code=vb] Set mobjPrm = mobjCmd.CreateParameter("@prmOne", adInteger, adParamInput, 2) mobjCmd.Parameters.Append mobjPar [/code] Regards Veena

Member Avatar for QVeen72
0
272
Member Avatar for sganandhsg

Hi, This is normally due to difference in Data-types.. Post your Select statement here.. Regards Veena

Member Avatar for sganandhsg
0
100
Member Avatar for sganandhsg

Hi, Group Option Buttons and Place them on some Container like Frames, So for each set of Option buttons on the frame, One option can be true.. for your problem, you need 10 frames with 2 option buttons each.. Instead of Frame, you can use PictureBox as well.. Regards Veena

Member Avatar for sganandhsg
0
78
Member Avatar for MichaelSammels
Member Avatar for atplerry

Hi, Place the Database in The Server in a Shared Folder, Shareing should be given with full read/write access.. Either MAP the Folder In all the systems OR Refer to UNC Path like this : \\MyServerName\MyShareFolder\MyDB.mdb Regards Veena

Member Avatar for QVeen72
0
115
Member Avatar for ryan311

Hi, Its always Better to Keep a Static Boolean Variable in such cases... Try this : [code=vb] Private Sub Command1_Click() Static TFlag As Boolean If TFlag Then Picture1.Picture = LoadPicture("D:\hehe\Sunset.jpg") Else Picture1.Picture = LoadPicture("D:\hehe\Winter.jpg") End If TFlag = Not TFlag End Sub [/code] Static Variables are Variables declared within the …

Member Avatar for QVeen72
0
108
Member Avatar for locsin

Hi locsin, I guess, you must have set Form's Border = Fixed Dialog, make it Border = Fixed Single With msgbox, you form will not disappear.. Regards Veena

Member Avatar for QVeen72
0
95
Member Avatar for smile4evr

Hi, Populate the ComboBox using This SQL Query: Select Distinct Reasons From MyTable And allow the User to Select one of them.. If a User wants to enter new Reason, In Keypress Event , Trap the Escape Key, and allow him to enter a New Reaon, Anyway, whenever, you save …

Member Avatar for QVeen72
0
149
Member Avatar for metricspaces
Member Avatar for abu taher
Member Avatar for aktharshaik
0
559
Member Avatar for jaasaria

Hi, Try this : Report.Printout False Without vieiwng the report.. Regards Veena

Member Avatar for jaasaria
0
131
Member Avatar for guest11

Hi, How are the Forms Named..? You can code, if it is Named Sequential.. Say Form1, Form2, Form3.. Regards Veena

Member Avatar for jireh
0
115
Member Avatar for k8f1

Hi, Whatever code you have pointed, I guess, there should not be any space between "Else" and "If".. Check this : [code=vb] if RandomOrg = 1 Then Org.src = Org1Pic(Luck) Elseif RandomOrg = 2 Then Org.src = Org2Pic(Luck) Elseif RandomOrg = 3 Then Org.src = Org3Pic(Luck) End if [/code] Regards …

Member Avatar for vponline
0
164
Member Avatar for shruti23

Hi Shruti, rstkw has already answered you: Write this Code: Kill "C:\MyFolder\*.tmp" Change MyFolder, to whatever folder you want.. Anyway, whenever, you Kill files, you need to be carefull.. Regards Veena

Member Avatar for vponline
0
1K
Member Avatar for Baskar_engg

Hi, U can [URL="http://put.hk/article/news.microsoft.com/microsoft.public.dotnet.framework.adonet/138381/System-Transactions-Diagnostics-DiagnosticTrace-throws-an-exception-of-initialization.html"]Try This [/URL] REgards Veena

Member Avatar for technicalganesh
0
195
Member Avatar for sneha sirohi

Hi, if u dont want the use 2 input boxes, use one box and tell the user to enter Id and pwd seperated by a / and in ur code, u seperate both of them check this : [code] dim myarr dim mystr mystr=inputbox("Enter Uid/pwd") if instr(mystr,"/")>0 then myarr =split(mystr,"/") …

Member Avatar for jan_grace85
0
96

The End.