652 Posted Topics

Member Avatar for newto_vb

Hi, Unlike ListBox, u cant set the "Text" Property of a ComboBox, especially when its Style property is set to DropDown List. U have to loop thru the List Items and make it selected. Check this : [code] Dim i As Integer Dim str1 As String str1 =RS1.Fields(7) For i= …

Member Avatar for PriyaPD
0
1K
Member Avatar for gurutheja

Hi Raghu, Add References Microsoft ActiveX Data Object Library 2.0 to ur project Connection To Oracle is : [code] Dim adoCn As New ADODB.Connection Dim sSQL as String Dim RST As New AdoDb.RecordSet sSQL= "Provider=MSDAORA.1;Password=MyPwd;" _ & " User ID=MyUserName;Data Source=MyDataSource;" _ & " Persist Security Info=True" With adoCn .CursorLocation …

Member Avatar for azizulkhn
0
391
Member Avatar for shashikanth

Hi, You want to get Total in a Single Query..? Is the Field in Access Table DateTime field or Single/Decimal field..? You can do it in a single query... Regards Veena

Member Avatar for debasisdas
0
2K
Member Avatar for Es Sayen

Hi, Write This Code In Lost_Focus event of ComboBox:(Conn-> Connection object) DIm RST As New ADODB.RecordSet Dim sSQL As String sSQL = "Select * From MyTable Where RollNo = " & Val(Combo1.Text) RST.Open sSQL, Conn If Not RSt.EOF Then txtName.Text = RST("Name") txtAdd.Text = RST("Addr") txtAge.Text = RST("Age") Else txtName.Text …

Member Avatar for abdalla_92
0
1K
Member Avatar for newwin

hI, Use "Microsoft Common Dialog Control " , add it from Projects>Components: "Microsoft Common Dialog Control 6.0" add it to form and in command Click : [code=vb] CommonDialog1.ShowOpen FileName = CommonDialog1.FileName [/code] Set "Filter" property to filter particular File extensions Regards Veena

Member Avatar for ntuthuzelojames
0
171
Member Avatar for ragheshpokkattu

Hi, Use This Code: Repairs C:\DB1.mdb Dim TempStr As String Dim OrigStr As String OrigStr = "C:\DB1.mdb" TempStr ="C:\DBTemp.mdb" ' On Error Resume Next Kill TempStr DBEngine.RepairDatabase OrigStr, TempStr Kill OrigStr FileCopy TempStr, OrigStr Kill TempStr Msgbox "Repaired Successfully" Regards Veena

Member Avatar for Davidpoul
0
253
Member Avatar for mukund_Sadrani

Hi, Not sure, wht you are trying to do here..? You can simply Increase the Footer section to whatever size you want... REgards Veena

Member Avatar for s.ponnurangam
0
327
Member Avatar for yanz

Hi. Give this code from where u r stuck. MSComm1.Input Do DoEvents Buffer$ = Buffer$ & MSComm1.Input Loop Until InStr(Buffer$, "OK" & vbCrLf) ' Read the "OK" response data in the serial port. ' Close the serial port. MSComm1.PortOpen = False Regards Veena

Member Avatar for roeyco81
0
238
Member Avatar for kehar

Hi Kehar, Check this : [url]http://visualbasic.ittoolbox.com/groups/technical-functional/vb-crystalreports-l/how-to-print-currency-in-words-1885844[/url] You need to create a New Formula for that.. Regards Veena

Member Avatar for mustaf52
0
172
Member Avatar for jayz_raul

Hi, [URL="http://www.activexperts.com/activsms/howto/gsm/vbnet/"]Check This[/URL] and also Download examples from the same site... REgards Veena

Member Avatar for SaLMaN-2
0
137
Member Avatar for dinilkarun

Hi, Try This Code: [code=vb] Dim exel As Object Dim WBEx As Object Dim ExelWS As Object Dim appwd As Object Set exel = CreateObject("Excel.Application") Set WBEx = exel.Workbooks.Open("C:\Myexce.xls") Set ExelWS = WBEx.Worksheets("Sheet1") Set appwd = CreateObject("Word.Application") appwd.Visible = True appwd.Documents.Open FileName:="C:/doc1.doc" ExelWS.Range("A1:D20").Select Selection.Copy appwd.Selection.PasteSpecial Placement:=wdInLine, DataType:=wdPasteMetafilePicture appwd.Documents.Save Set appwd …

Member Avatar for h.khuraidah
0
927
Member Avatar for stan yost

Hi, if u want to get users response, create a new form(frmOptions) with all the options and show it in modal form, this way, frmOptions.Show 1 The Program Halts processing until u close the Modal frmOptions. Alternatively, u can give options in a Frame and show the frame, but u …

Member Avatar for saikrish
0
129
Member Avatar for snta
Member Avatar for kehar

Hi, Its always a Good Idea To Create a Seperate Database for each Financial year. Just copy the existing database as new one using "FILECOPY" and clear tables .. Regards Veena

Member Avatar for QVeen72
0
145
Member Avatar for JohnKelly

Hi, Declare this API at the top : [code=vb] Private Declare Function SHGetFolderPath Lib "shfolder.dll" _ Alias "SHGetFolderPathA" _ (ByVal hwndOwner As Long, _ ByVal nFolder As Long, _ ByVal hToken As Long, _ ByVal dwReserved As Long, _ ByVal lpszPath As String) As Long [/code] to Get the path …

Member Avatar for 1RealTruth
0
804
Member Avatar for bitki_1407

Hi, Comment the line causing average, as it is not necessary. Dim avg as Currency As Average need not necessarily be asn Integer. Regards Veena

Member Avatar for lordofhell
0
4K
Member Avatar for Jouni79

Hi, Try This : =Replace(FormatNumber(Sum(Fields!TotalProductPrice.Value),2),".",",") Or Change the Local/Regional settings in Control Panel. For Numbers, Give comma as DecimalSymbol. Regards Veena

Member Avatar for QVeen72
0
91
Member Avatar for jbisono

Hi, Why do you want to use "AppendChunk" for simple string..? Try This : nVNBR = "hi how are yodsf sdf" rsVen("BITS") =nVNBR rsVen.Fields("BITS_LENGTH") = 19 ' Or ' rsVen.Fields("BITS_LENGTH") =Len(nVNBR) rsVen.Update Regards Veena

Member Avatar for jbisono
0
282
Member Avatar for zela

Hi, Open your Database like this : Set db = ws.OpenDatabase(App.Path & "\Masterfile.mdb", False, False, ";pwd=MyPassword") Regards Veena

Member Avatar for zela
0
142
Member Avatar for VIPER5646

Hi, CheckListBox, Automatically Toggles between Check and UnCheck, you dont have to write the code in Click event. Remove all the Code and Check.. Regards Veena

Member Avatar for VIPER5646
0
141
Member Avatar for ProgrammerX

Hi, What I guess, is txtPrincipal has been created as a Part of the Control Array. If so, you will find some Numeric value in the "Index" property. Just Clear that, your code should work fine. Also Check the same for other controls as well.. Regards Veena

Member Avatar for QVeen72
0
371
Member Avatar for kn2790

Hi, Field Names which have SpecialCharacters/Spaces, need to be enclosed in a Square Bracket.. Try This : SQL = "Insert into Bookings(StaffID,RoomID,[Date required]," _ & " [Time required],[Additional requirements]) values('" _ & "'" & stafid.Text & "', " _ & "'" & rooid.Text & "', " _ & " #" …

Member Avatar for QVeen72
0
109
Member Avatar for DZSlasher

Hi, In Form_Load, just write this : (I guess "Whitebox", is the name of your Picturebox) Whitebox.Location.X() =32 Whitebox.Location.Y() =32 OR PictureBox1.Left = 32 PictureBox1.Top = 32 Regards Veena

Member Avatar for QVeen72
0
299
Member Avatar for chanthung

Hi, The error message seems to be clear, There is an "End If", without the "IF" condition. Just Check the code block pointed by the Compiler , Or post it here.. somebody here will help you. Regards Veena

Member Avatar for QVeen72
0
88
Member Avatar for firoz.raj

Hi, If Product Name is String, then Wrap it with Single Quotes : Try This : [code=vb] Set rs = Nothing Set rs = New ADODB.Recordset rs.Open "select materials.unit from Materials Where Materials.productname='" & Combo3.Text & "'", Con ' Rest of Coding Remains Same '[/code] Regards Veena

Member Avatar for QVeen72
0
120
Member Avatar for yasirfarid
Member Avatar for limesight18

Hi, Your Label is a a Control Array. So, Check the "Index" Property of the Label, and Change your code to, Say If Index=2 then : lblStartTime(2).Caption = rsRecordSet.Fields("Unit").Value & "" Regards Veena

Member Avatar for limesight18
0
99
Member Avatar for ziopulcher
Member Avatar for kehar

Hi, Immediately after setting recordsource, you have to refresh.. try this : [code=vb] adodc1.recordsource = "Select name from emp where name='" & Text2.Text & "'" Adodc1.Refresh text1.text =adodc1.recordset.Fields(0) [/code] Also check, ConnectionString is set before running the above code.. Regards Veena

Member Avatar for QVeen72
0
1K
Member Avatar for leroi green

Hi, Where are you writing this code ..? (Which event) and is there any other code before this line ..: If chancecount <= 8 Then ..? I guess, there must be a Loop there.. So which IF, you want to change to the loop? (there are 3 IF's) Regards Veena

Member Avatar for leroi green
0
75
Member Avatar for kehar
Member Avatar for locsin

Hi, I Guess, if it is an ADO recordset, you can give Just One Column Search, (not multiple). Like Debasis said, open another Recordset with "Where" Condition Regards Veena

Member Avatar for QVeen72
-1
172
Member Avatar for TheBrenda

Hi, First Create a ".DLL" of Project2... Then in Project1 Include the DLL, and then you can Instantiate.. Regards Veena

Member Avatar for QVeen72
0
74
Member Avatar for sony112

Hi, What I personally feel is, For databases like Access(<=2k), or .dbf, just use DAO. DAO objects/Methods are quite Flexible. For example, ADO's FIND, does not support Multiple Column search in Recordset. (No Matter whatever version), This Limitation Costs us to Open another Recordset Object. Whatever be the Technology, Important …

Member Avatar for QVeen72
0
112
Member Avatar for abu taher

Hi Abu, Well... Follow these Steps: 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 …

Member Avatar for abu taher
0
811
Member Avatar for abu taher

Hi, Normalise your database, No need to save same data at 2 places, as you may later face syncronization problem, and Redundant data problem. What you need to do is Create a StudentMaster Table With ID, Name, Address.. etc.. and Save Stud_ID, in other Linked Tables, To get the name, …

Member Avatar for javmedia
0
101
Member Avatar for uma9
Member Avatar for uma9
0
240
Member Avatar for swatirao

Hi, U want to design a Report Based on the Result of a Query of Filter out Records for a Condition? For First Case, Use Stored Procedures For(Oracle/SQL SErver) Or QueryCommand(Access) Use "Select Records Expert" for Second Condition. It will Filter the Records and show, Eg for a period or …

Member Avatar for benuu
0
120
Member Avatar for devilz

Hi, Try This Code: [code=vb] Dim FromDate As Date Dim ToDate As Date Dim TempDate As Date Combo1.clear FromDate = DateSerial(Val(cmbYear.Text), (CmbMonth.ListIndex+1), 1) ToDate = DateAdd("m", 1, FromDate) ToDate = ToDate - 1 TempDate = FromDate For TempDate = FromDate To ToDate Combo1.AddItem (Format(TempDate, "dd-mm-yyyy") & " " _ & …

Member Avatar for devilz
0
549
Member Avatar for jo84

Hi, Check The Length and Prefix a 0 [code=vb] If Right(UCase(Text1.Text), 1) <> "R" then Text1.Text = Text1.Text & "R" End If If Len(Text1.Text) < 7 Then Text1.Text = String((7-Len(Text1.Text)),"0") & Text1.Text 'Pads with zeros to make 7 Chars End If [/code] Regards Veena

Member Avatar for QVeen72
0
151
Member Avatar for guest11

Hi, Set ComboBox's Style = 2 -DropDown List This will allow user to only select from the available List Regards Veena

Member Avatar for selvaganapathy
0
246
Member Avatar for ryan311

Hi, Try This : Text3.Text = Format(Val(Text1.Text)+Val(Text2.Text), "0.00") Regards Veena

Member Avatar for QVeen72
0
118
Member Avatar for ryan311
Re: hi

Hi, I Guess, there is no in-built control like that in VB6, But you can Create one.. Place a Timer Control on the Form, and set its Interval =200 Also Place a Label Control.. Write this code: [code=vb] Private Sub Timer1_Timer() ' Static T As Integer Static LFlag As Boolean …

Member Avatar for Matt3144
0
125
Member Avatar for firoz.raj

Hi, You cant have Multiple columns like that.. What you can do is, use a Uniform Width Font and Pad the results with Spaces, and populate the listbox.. Set ListBox's Font = "Courier New" and Load List Like this : [code=vb] Dim strReq as String * 10 Dim strName as …

Member Avatar for firoz.raj
0
160
Member Avatar for RahulV

Hi, [URL="http://www.vbforums.com/showthread.php?t=356751"]Check This Link[/URL] Regards Veena

Member Avatar for jireh
0
236
Member Avatar for RahulV

Hi, You cannot set the Start-Up position for the MDI Child forms in VB6.. This is from MSDN Help: The initial size and placement of MDI child forms are controlled by the Microsoft Windows operating environment unless you specifically set them in the Load event procedure. So You can write …

Member Avatar for jireh
0
690
Member Avatar for firoz.raj

Hi, Open Report In CR Designer, Goto menu : Insert >> Special Field >> Record Number Field and then Save the report REgards Veena

Member Avatar for firoz.raj
0
204
Member Avatar for sal21

Hi, Try This : [code=vb] Dim TNode as Node Set TNode = Trvw.Nodes("AG. -0300") 'Note Ag.-300 is the Key of the node MsgBox TNode.Children [/code] Regards Veena

Member Avatar for QVeen72
0
321
Member Avatar for nor_d83

Hi, Try This : [code=vb] Dim i As Integer Dim TAmt As Currency TAmt = 0 For i = 1 To Grd.Rows-1 TAmt = TAmt + Val(Grd.TextMatrix(i, 8)) Next TAmt = TAmt +Val(txtBudget.Text) MsgBox "Total Amount Is : " & Format(TAmt, "0.00") [/code] Change names of your controls, and Column …

Member Avatar for nor_d83
0
172
Member Avatar for t_yalthis

Hi, Yes it should be [URL="file://\\ServerSharedFolderName\reservation97.mdb"]"\\ServerSharedFolderName\reservation97.mdb[/URL]" Note here, the Sahred Folder in Server Name Should Have Complete Read/Write Access.. Regards Veena

Member Avatar for Comatose
0
668

The End.