652 Posted Topics
Re: Hi Dreamboy, Where is "FROM" keyword in ur SQL Statement. Check this : Set rsMyRS = dbMyDB.OpenRecordset("select * From [PC_User_Details] where Name='" & userlist.Text & "'") Regards Veena | |
Re: Hi, Narrow Down ur question. This is no Tuorial. Open a new project in VB6, Add controls from tool box, Double Click the Control and In code-Editor Right side ComboBox Lists all the Events of that Control, Most of them are Self Explainatory.. Regards Veena | |
Re: Hi, Set this Property of Form: KeyPreview =True. By doing this ur Form will First Receive the KeyPress event before the Control. Regards Veena | |
Re: Hi Ahmed, First Create the Database and then Open It. Syntax for creating Database is : DBEngine.CreateDatabase "Works.mdb", dbLangGeneral After Creating Open the Database: Set DB = DBEngine.OpenDatabase("Works.mdb", False, False) Regards Veena | |
Re: Hi, U can also use a Special NonPrintable Character like: Combo1.AddItem ("1" & Chr(165) & "One") When u need to Seperate them, use [B]"[COLOR=red]Instr[/COLOR]"[/B] Function Regards Veena | |
Re: Hi, Use This Code: Me.Picture = LoadPicture("C:\MyPict.bmp") Regards Veena | |
Re: Hi, Check [URL="http://www.freevbcode.com/ShowCode.Asp?ID=109"]this Link [/URL] Regards Veena | |
Re: Hi, Get Connection String here: [URL]http://www.connectionstrings.com/?carrier=access[/URL] Change the Path to Server Path. Regards Veena | |
Re: Hi tgif, use this Code: xlApp.Range("L:L").NumberFormat = "mm/dd/yyyy" Regards Veena | |
Re: Hi, In ur original Text file, if all the parameters are "Sequential", then u can keep a Running Total and print the Total If Parameters of Next line Changes, and then Re-Set the Total REgards Veena | |
Re: Hi Rob, ur Syntax for "Select-Case" is wrong. In ur code, the Boolean Result of [COLOR=green][B]"Age_Chk<2"[/B][/COLOR] Considered for Select Case. Check this Syntax [code] Select Case Age_Chk Case [B][COLOR=red]Is < 2[/COLOR][/B] AgeGroup = 1 Case [COLOR=red]2[/COLOR] AgeGroup = 2 Case [COLOR=red]3[/COLOR] AgeGroup = 3 Case [COLOR=red]4[/COLOR] AgeGroup = 4 Case … | |
Re: Hi, Check This Code: [CODE] Private Sub cmdOpenExcel_Click() ' Dim ACn As New ADODB.Connection Dim RST As New ADODB.Recordset ' With ACn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data Source=C:\MyExcel.xls ;Extended Properties=Excel 8.0;" .CursorLocation = adUseClient .Open End With ' SET RST =Nothing RST.Open "select * from [XL_SHEETNAME]", ACn, adOpenDynamic, adLockReadOnly … | |
Re: Hi, Usually u use "Get/Append Chunk" For huge Data(usually in kb/Mb). Where as Date/Numeric/Text Do not go that high. May be it works, u can give it a try.. Regards Veena | |
Re: Hi, Design Report Based on the Query. Change the Query Before Printing the Report. example Query: Select * From MyTable Where ID=1 Regards Veena | |
Re: Hi, Keep a Public Array of Selected ID's. In the LoadOrders Fill the DataGrid With all the items in the Array. Say If ur SQL Query Is: Select * From OrderDet Where ItemId='aa' Change It to: Select * From OrderDet Where ItemId In ('aa','bb','cc','cc') U can use "Join" function to … | |
Re: Hi, Just Find the Path of "WINWORD.exe" (MS Office) normally found in "Program Files\Microsoft Office\OFFICE" path Shell sSQL, vbMaximizedFocus and open like this : Dim sSQL As String sSQL = "C:\Program Files\Microsoft Office\OFFICE11\winword.exe C:\mydoc.doc" Shell sSQL, vbMaximizedFocus Regards Veena | |
Re: Hi, Why dont u use "HTML Help WorkShop" which comes with VB6. It will be Installed in "Visual studio Tools " Menu. For a Sample Help file Creation Check this Link : [URL]http://podgoretsky.com/ftp/Docs/Basic/Using%20Visual%20Basic%206/ch24/ch24.htm[/URL] Regards Veena | |
Re: Hi, U dont have to Loop thru Record sets to Find the IP Address.. Check this Code: Dim sSQL As String Dim RST As New ADODB.RecordSet sSQL ="Select * From Table_Name Where FCUIPAddress ='" _ & Text1.Text & "' Set RST= Nothing RST.Open sSQl,Conn,AdOpenDynamic, AdOpenLockOptimistic ' If RST.EOF Then ' … | |
Re: Hi, Use This Query: For Distinct Count: Select Distinct Count(myfield) From Mytable For Number Of Rrcords: Select Distinct Count(*) From Mytable For Sum: Select Distinct Sum(amt_field) From Mytable Regards Veena | |
Re: Hi, Have u tried "[B][COLOR=red]ThumbBrowse[/COLOR][/B]" from here: It seems to be very fast... [URL]http://www.vbcode.com/Asp/showzip.asp?ZipFile=ThumbBrowse.zip&theID=502[/URL] Regards Veena | |
Re: Hi, Have you Created a Set-Up package for ur project using "Package and Deployment Wizard" ? U run that and copy the exe/reports/db to target machine, then it will work fine.. Regards Veena | |
Re: Hi Yasir, Use a "CLOB", "BLOB" OR "IMAGE" TO Store Image Data. If u r using "ADO" to interact with SQL DB, then u can Stream IN and OUT the Image / Picture, Else Open the Pict File And use GetChunks and store the image.. REgards Veena | |
Re: Hi, Data Reports Can Not show Serial Numbers. One way around in Use a Temporary Table With "Auto-Generated" Field , populate that table and print Reports. Auto generated Numbers will be in Serial. Once populated next time when u Delete and populate new records the auto-number Field will not reset. … | |
Re: Hi Shrini, To Create a Screen Resolution-Independent form, Check this Link from M$ Here : [url]http://support.microsoft.com/kb/182070[/url] Regards Veena | |
Re: Hi , Try This : Dim NewStr As String NewStr = "'" & Join(CITYARR,"','") & "'" QUERY = "SELECT CITY FROM USCITY WHERE CITY IN (" & NewStr & ")" REgards Veena | |
Re: Hi, Use [B][COLOR="green"]"Split"[/COLOR][/B] Function. [CODE] Dim MyArr Dim i As Long MyArr = Split(TextBox1.Text, VbCrLf) For i = 0 To UBound(MyArr) Debug.Print MyArr(i) Next [/CODE] Regards Veena | |
Re: Hi, System will not understand that, u have to code for it, Keep a Boolean Variable and Open a new recordset and have another button for "FindNext".. Regards Veena | |
Re: Hi, Directly u cannot Configure the ToolBox in VB6.. There's a way around. Create any dummy Project , add a Common Dialog Control and all the required OCX Controls. Now Place all the Controls on a Dummy Form. Save that form(say MyForm) in "C:". save whole project/Form.. Now in New … | |
Re: Hello Manoharan, Mr. Wobbles is Using VB2005 and Table Adapters([COLOR=red][B]ADO.NET[/B][/COLOR]).. And u r Telling him about VB6/ADO.. TableAdapters dont support "Cursors" REgards Veena | |
Re: Hi, In User and Group Permission, u have to Set all (Read Design, Modify Design....all) the Permissions for : [B]"<NewTables/Queries>"[/B] [B]Regards[/B] [B]Veena[/B] | |
Re: [quote=Prozeen;390355][URL="http://www.codeguru.com/vb/controls/vb_othctrl/ocxcontrols/article.php/c9175/"]Something like this?[/URL][/quote] So, Why dont u down load from that Code Guru Website and use it.. its a very good Example... and quite simple Regards Veena | |
Re: Hi Anud, Just Keep a Public Form Level Boolean Variable, and Make that true When Comman button is Clicked. and check based on that Regards Veena | |
Re: Hi Shweti, Use this query in ComboBox LostFocus : Dim sSQL As String sSQL ="Select * From Party Where ProfID " _ & " ='" & Combo1.Text & "'" Populate Recordset using the Above Query Regards Veena | |
Re: Hi Deep, U r opening Excel using [B][COLOR=green]"Excel Object " [/COLOR][/B]or by Opening in "[COLOR=red][B]OLE Control"[/B][/COLOR]...? I have the code if u r opening with Excel Object. Regards Veena | |
Re: Hi, Just use mutile "If" conditions : Dim MyVal As Single MyVal = Val(Label1.Caption) If Val(Label2.Caption) > MyVal Then MyVal = Val(Label2.Caption) End If If Val(Label3.Caption) > MyVal Then MyVal = Val(Label3.Caption) End If If Val(Label4.Caption) > MyVal Then MyVal = Val(Label4.Caption) End If Msgox "Highest Value Is : " … | |
Re: Hi WWillow, Keep it Simple, Place The ListBox On the Frame, And Disable the Frame , Enable the List Box, ur job will be done. Regards Veena | |
Re: Hi Anud, Compile the .dll file. In New VB Project, Just Go To References and Add the .dll File By Browsing, VB will Register it for u, u dont have to Register it. Then Call the Dll Functions/Procedures in ur New Project By Instancing it using "New" keyword. Regards Veena | |
Re: Hi, Dont Check In "icResponseReceived" State , Check in "icResponseCompleted" State. Shift the whole code in Select statemnet from 8 to 12 Regards Veena | |
Re: Hi, Just check it with: If Option1.Value =True Then Or If Option1 Then Regards Veena | |
Re: Hi, Are u sure Form's Visible = True...? Instead of calling a Form In Module, Do it the other way-round. Change the Start-Up Form To the First Form, and in that Form-Load, Call the Module Procedure. Regards Veena | |
Re: Hi, Suppose u have to select from Options "Good" Or "Bad" Place 2 option buttons of Form and Name then "OptGood" >> Caption >> "Good" "OptBad" >> Caption >> "Bad" If u want to Select "Good" then: OptGood.Value =True To check which is selected : If optGood.Value =True Then Msgbox … | |
Re: Hi, Assign this way : Mscomm1.Settings=Combo1.Text & "," & Combo2.Text _ & "," & Combo3.Text & "," & Combo4.Text Regards Veena | |
Re: Hi, DBGrid Cannot be used without datacontrol. If u want to Set Dynamically, then use DataGrid, U can Set DataSource of a DataGrid To a RecordSet. Regards Veena | |
Re: Hi, Use : Form1.Show It will Load and Show (Not necessary to Load and Show) Regards Veena [quote=anud18;384402]how can i load a form from a module created in d same project??...........What function should i use to do so???[/quote] | |
Re: Hi, If using DAO : Dim DB As DataBase Set DB = DBEngine.OpenDatabase("C:\DB1.mdb", False, False, ";PWD=MyPWD") If using ADO: Set conn = New ADODB.Connection conn.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\DB1.mdb;" & _ "Jet OLEDB:Database " & _ "Password=MyPWD" conn.Open Regards Veena | |
Re: Hi, Open a New Project. Place A Command Button on the Form. Copy and Paste this Code Form Level: [code] [COLOR=green]Option[/COLOR][COLOR=green] Explicit[/COLOR] [COLOR=green]'[/COLOR] [COLOR=green]Dim [COLOR=red]TFlag[/COLOR] as Boolean[/COLOR] [COLOR=green]Private[/COLOR][COLOR=green] Declare Function FindWindowEx Lib "user32" _[/COLOR] [COLOR=green] Alias "FindWindowExA" ([/COLOR][COLOR=green]byval[/COLOR][COLOR=green] hWnd1 [/COLOR][COLOR=green]as[/COLOR][COLOR=green] Long, [/COLOR][COLOR=green]byval[/COLOR][COLOR=green] hWnd2 [/COLOR][COLOR=green]as[/COLOR][COLOR=green] Long, _[/COLOR] [COLOR=green]byval[/COLOR][COLOR=green] lpsz1 [/COLOR][COLOR=green]as[/COLOR][COLOR=green]string[/COLOR][COLOR=green], [/COLOR][COLOR=green]byval[/COLOR][COLOR=green] … | |
Re: Hi, If u r using VB6, Change this Line : Set RS = ADOConn.Execute("SELECT [ID] FROM Data;") To Set RS =Nothing RS.Open "SELECT Max(ID) FROM Data;",ADOConn If Not RS.EOF Then If Not Is Null(RS(0)) Then GetData =RS(0)+1 Else GetData=1 End If End If I hope It is Clear. If u … | |
Re: Hi, If only for Display, Simplest Way would be, Place and OLE Control on the form and give options this way, * Create New * Object Type : Microsoft Excel Work Sheet To Display, Private Sub cmdShowExcl_Click() OLE1.CreateLink "C:\MyExclSheet.xls" End Sub Regards Veena | |
Re: Hi, you need not use "[Q: Naming Assignments]" Instead of that, just enter the Query Name. in Square Brackets. Remove "Q:" That should work fine. Regards Veena | |
Re: Hi, After Printer.KillDoc Give : Printer.EndDoc. This Ensures current printing Document is Terminated. To remove all from Queue, Put in a loop and Check. Regards Veena |
The End.