652 Posted Topics

Member Avatar for linux

[quote=linux;319918] [B] frmJobInfo!cboShops.AddItem (MyShop [COLOR=red][1][/COLOR] )[/B] [B] frmJobInfo!cboShops.AddItem (MyShop[COLOR=red] [2][/COLOR] )[/B] [/quote] Hi, I think, it is the "SQUARE Bracket" troubling you. Chanage ur code to : [COLOR=blue][B].AddItem (MyShop[COLOR=darkolivegreen](1)[/COLOR] )[/B][/COLOR] Regards Veena

Member Avatar for linux
0
186
Member Avatar for paramasivan
Member Avatar for stan yost

Hi, Try try writing ur code in Validate Event. This Event occurs just before changing the currenct record. Regards Veena

Member Avatar for stan yost
0
81
Member Avatar for Randika

Hi, Text1.Text = Format(Date, "dd-mm-yyyy") Text1.Text = Format(Now, "hh:mm:ss") Regards Veena

Member Avatar for Randika
0
90
Member Avatar for brian.p

Hi, Why dont u allow user to enter in Uppercase. Just Set Form's Key Preview Property =True And Give this code in Form KeyPress Event. [code] Private Sub Form_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) End Sub [/code] And Use Validate Event of TextBox to check Valid Entry, Instead of using …

Member Avatar for brian.p
0
143
Member Avatar for WhYuLoOkIn

Hi, Where u r inputting 3rd Digit..? I think this would suffice, U dont have to put in a Loop, to Calculate the Difference between 2 Values. [code] [COLOR=#0000ff]Private[/COLOR] [COLOR=#0000ff]Sub[/COLOR] Button1_Click([COLOR=#0000ff]ByVal[/COLOR] sender [COLOR=#0000ff]As[/COLOR] System.Object, [COLOR=#0000ff]ByVal[/COLOR] e [COLOR=#0000ff]As[/COLOR] System.EventArgs) [COLOR=#0000ff]Handles[/COLOR] Button1.Click [COLOR=#0000ff] Dim[/COLOR] [COLOR=red]i[/COLOR] [COLOR=#0000ff]As[/COLOR] [COLOR=#0000ff]Double[/COLOR] [COLOR=#0000ff] If[/COLOR] Val(TextBox1.Text) > Val(TextBox2.Text) …

Member Avatar for WhYuLoOkIn
0
102
Member Avatar for kshamasb08

Hi, Have u Opened a Record Set To Add to Database, Or Using Insert Statement.? if u have Opened a Database in Form1, U will have to Open Again in Form2 also, Or Else Add a Module and Define and Open Database as Public Project Level. Regards Veena

Member Avatar for QVeen72
0
87
Member Avatar for yuni

Hi, Use this Code : In ur MDIFormLoad Or the StartUp Form Load. [code] Private [COLOR=blue]Sub[/COLOR] MYMDIForm_Load() If [COLOR=blue]App[/COLOR].PrevInstance Then [COLOR=red]End[/COLOR] End If End [COLOR=blue]Sub[/COLOR] [/code]

Member Avatar for QVeen72
0
115
Member Avatar for buffy2
Member Avatar for dmetz
0
144
Member Avatar for richburg

Hi, Use Late Binding of the .dll, like Create object. Dont directly add the reference in VB6 (Calling project). Dim MyObj As Object Set MyObj = CreateObject("MyProj.MyDll") This code creates an instance of the MyDll class that is defined by the DLL project named MyProj. After Creating the Class Object, …

Member Avatar for richburg
0
260
Member Avatar for EnderX

Hi, Use This Code [code] Dim FN As Long Dim sSQL As String FN =FreeFile Open "C:\aaa.ini" For Input As FN [COLOR=darkred]Use this code to Read Line :[/COLOR] Line Input #FN, sSQL [/code] Regards Veena

Member Avatar for sushanth
0
1K
Member Avatar for ndicuh

Hi, In one of the Access Table Keep a Field As InstlDate, For the First Time, user Logs In, Check IF the field is Null/Blank then, Save Current Date. Every time user logs in, check that field and compare with Current date. U can come out of the Program (Using …

Member Avatar for ndicuh
0
97
Member Avatar for stan yost

Hi, Check this code: [code] Dim [COLOR=blue]xlsheet[/COLOR] As Excel.Worksheet [COLOR=red]TO READ FROM EXCEL[/COLOR] Text1.Text = [COLOR=blue]xlsheet[/COLOR].Cells(2, 1) Text2.Text = [COLOR=blue]xlsheet[/COLOR].Cells(2, 2) ' [COLOR=red]TO WRITE INTO EXCEL[/COLOR] ' [COLOR=blue]xlsheet[/COLOR].Cells(2, 1) = Text1.Text [COLOR=blue]xlsheet[/COLOR].Cells(2, 2) = Text2.Text [/code] Regards [COLOR=purple]Veena[/COLOR]

Member Avatar for QVeen72
0
99
Member Avatar for fskhan

Hi, Use MS-Access, Go to MS-Access, Select NewDatabase Option, Enter Path and Name , Say Create. Click On New-->>Design View-->> OK Enter Field Name, Type : Date/Time (Stores Both). In VB, to get System Date : Format(Date,"dd-mm-yyyy") System Time : Format(Now,"hh:mm:ss") Compare Dates : If Format(CDate(Text1.Text),"dd-mm-yyyy") = Format(Date,"dd-mm-yyyy") Then ' …

Member Avatar for fskhan
0
143
Member Avatar for darklynx489

Hi, Try this : After Appending the Column say MyColumn [code] Dim cat As New ADOX.Catalog Set cat.ActiveConnection = CurrentProject.Connection With !MyColumn .Append "MyColumn", adWChar, 50 Set .ParentCatalog = cat .Properties("Jet OLEDB:Allow Zero Length") = True .Properties("Nullable") = True End With With .Columns .Append "Auto_ID", adInteger With !Auto_ID Set .ParentCatalog …

Member Avatar for QVeen72
0
806
Member Avatar for NewVBguy

Hi, Use this code [code] Private Sub cmdShowList_Click() With ListView1 .HideSelection = False .FullRowSelect = True .View = lvwReport .ColumnHeaders.clear .ListItems.clear .ColumnHeaders.Add , , "CHECKING" .ListItems.Add , , "1" .ListItems.Add , , "2" .ListItems.Add , , "3" .ListItems.Add , , "4" .ListItems.Add , , "5" .SelectedItem = .ListItems(.ListItems.Count) .SelectedItem.EnsureVisible End …

Member Avatar for QVeen72
0
201
Member Avatar for arvin2006

Hi Santosh, Its always better u start a new thread for a new question, or else ur question may go un-noticed. Anyway here is the code. If u r storing the name in combo list and corresponding ID in Item Data, use this code: Dim strName As String Dim strID …

Member Avatar for QVeen72
0
164
Member Avatar for juster21

Hi, Put it in the Windows Scheduler, Add 3 tasks in Scheduled Task for 3 different times. Available in Control Panel, Scheduled Task. Regards Veena

Member Avatar for QVeen72
0
84
Member Avatar for ndicuh

Hi, Use this connection string for SQL Server : "Driver={SQL Server}; Server=ServerName; Database=myDataBase;Uid=myUsername;Pwd=myPassword;" Regards Veena

Member Avatar for QVeen72
0
59
Member Avatar for daaboat
Member Avatar for QVeen72
0
177
Member Avatar for irfan.motiwala

Hi, What is the database back-end u r using? If u have done coding without creating the ODBC, then Changing the connection string will do. Tell me the datasbase, What data objects u r using in VB? (DAO/RDO/ADO...?) if possible paste the database connection here. i will give u the …

Member Avatar for QVeen72
0
123
Member Avatar for Dogfish

Hi, Set these properties for Timer Control : Interval = 10000 Enabled = False Place A Command Button cmdStart on the Form. Caption ="Start" Keep a Form Level Variable MyTime [code] Dim MyTime As Long Private Sub cmdStart_Click() MyTime = 0 Timer1.Enabled =True cmdStart.Enabled = False End Sub Private Sub …

Member Avatar for QVeen72
0
294
Member Avatar for Pointblank5600

Hi, There is no way to remove the Scroll Bar of the List box If the Items are exceeding the Physical height of List Box. Use a single List Box and Show records in a Formatted Order. Like First 20 Char Field1, Next 20 Char Field 2, and Next 20 …

Member Avatar for QVeen72
0
99
Member Avatar for anandarose

Hi, I'am giving u the most simplest way of doing this. Place 1 ListBox on the Form say lstSMan Check Property, Sorted = False Clear lstSMan. Assuming U have Opened the File and u r in a loop. u have populated the variable SalesPerson. write this code inside the loop. …

Member Avatar for anandarose
0
161
Member Avatar for jigry

Hi, In Solution Explorer Right Click on Properties. In Left side tab, Click On Common Properties -->> Build -->> Right side u get Application Icon, Browse and select required icon. Regards Veena

Member Avatar for Dukane
0
158
Member Avatar for millanskie

Hi, Create a ODBC for the database say MyODBC And use this Connection String Dim AdoCn As New ADODB.Connection AdoCn.ConnectionString = "Provider=MSDASQL.1;Password=MyPassword;Persist Security Info=True;User ID=MyUserID;Data Source=MyODBC" AdoCn.Open Regards Veena

Member Avatar for millanskie
0
188
Member Avatar for royaloba

Hi, Want to call Foxpro.exe in VB? Private Sub cmdShowFoxPro_Click() On Error Resume Next AppActivate Shell("C:\FoxPro.EXE"), vbMaximizedFocus End Sub Regards Veena

Member Avatar for QVeen72
0
62
Member Avatar for chetanpbhalerao

Hi, Try inno set up.. its a freeware. It allows u to create desktop icons, Install/UnInstall, and is higly customizable google for "inno set up" Regards Veena

Member Avatar for chetanpbhalerao
0
93
Member Avatar for Esther

Hi, The first error, it usually is generated when u have Re-Named the form in the Solution Explorer. Its a good idea to change the name of the form in Property Sheet. Regrading second problem, check if u have a Primary/Unique Key for the ID column. If key is there …

Member Avatar for QVeen72
0
133
Member Avatar for kern1306

Hi, Again i did not understand what u want to do..? Are u looking for For i=0 to 127 List1.AddItem i & " " & Chr(i) Next Regards Veena

Member Avatar for QVeen72
0
94
Member Avatar for sweety0

Hi Sweety, This Form is for u.. Down Load this attachment. if there is any problem, let me know Regards Veena

Member Avatar for sweety0
0
92
Member Avatar for lab3tech

Hi, Ok.. Yes u can do it. I will Give this For a Line Control. Keep A Form Level Boolean Variable say LnFlag. After Selecting Line From Ur Tool Box In Mouse Down of Picture Box, Load a Line [Say Line1(1)] and Make the LnFlag =True and Make Line1(1).X1 =X …

Member Avatar for MattEvans
0
123
Member Avatar for mc_reload87

Hi, Use a Package and Deployment Wizard and create a set-up package for your project and Install in the other machine. It will take care of registering all the ocx and dll's used in your project. Regards Veena

Member Avatar for QVeen72
0
224
Member Avatar for basilio

HI, Use this Set Attribute this way: SetAttr "C:\MyText.txt", vbReadOnly Regards Veena

Member Avatar for QVeen72
0
58
Member Avatar for sguy

Hi, The user who queries or inserts from linked databases should be a Global User registered with the LDAP directory service. Check if the User ID : max is a global user or not. Check if the user has "Insert" Rights in Destination Database and "Select" Rights In Source Database …

Member Avatar for sguy
0
159
Member Avatar for jetyan

Hi, Use Latest Version of VB Service Pack And In VB use ADO2.8. Without service pack, u cannot read Access 2003 Database Regards Veena

Member Avatar for Ancient Dragon
0
64
Member Avatar for PaulCC
Member Avatar for QVeen72
0
135
Member Avatar for Tymothy Galabzi

Hi, Your bitmap in access is in what form? Path is stored or An Object is stored? If path is Stored then it is simple. Me.Picture = LoadPicture(RST("MYImagePath")) If object stored, tell me in what format it is stored, i will give u the code. Regard Veena

Member Avatar for QVeen72
0
53
Member Avatar for sheida

Hi Sheida, Get these Books and start learning. VB is a very good language and easily learnable. Teach Yourself Database Programming in VB6 in 21 Days. Mastering VB6 (Evangelos Peutroutsis) Apart from that, u can use Online Help from MSDN. Go thru these forums, Read FAQ's. Regards Veena

Member Avatar for sweety0
0
75
Member Avatar for sweety0

Hi Sweety, Solution For Q-2 : Private Sub cmdOddEven_Click() Dim NOdd As Long Dim NEven As Long Dim TNo As Long Dim NEvenStr As String Dim NOddStr As String NEvenStr = "" NOddStr = "" NOdd = 0 NEven = 0 Do TNo = Val(InputBox("Enter The Number", "Check Odd Even", …

Member Avatar for QVeen72
0
170
Member Avatar for SpeedRacer69

Hi, Use DoEvents with a for loop For i=1 to 100 DoEvents Next Regards Veena

Member Avatar for QVeen72
0
93
Member Avatar for stealth_rhino

Hi, Give this way, curPrice = Val[COLOR=#66cc66]([/COLOR]txtPrice.Text[COLOR=#66cc66])[/COLOR] curCost = Val[COLOR=#66cc66]([/COLOR]txtCost.Text[COLOR=#66cc66])[/COLOR] [COLOR=#66cc66][/COLOR] [COLOR=#ff0000] curComm = 0.2 * (curPrice - curCost) lblCommissiondisplay.Caption = FormatCurrency(curComm,"0.00") lblNamedisplay.Caption = txtName.Text[/COLOR] [COLOR=#ff0000][/COLOR] [COLOR=#ff0000][/COLOR] [COLOR=#ff0000]Regards[/COLOR] [COLOR=#ff0000]Veena [/COLOR]

Member Avatar for sendoshin
0
111
Member Avatar for Nurilhansiz

Hi, Modify ur code this way, Dim FN As Long FN = FreeFile Open "C:\your_name.txt" For Input As #FN Do While Not EOF(FN) intCount = intCount + 1 Print #FN, txtWord.Text Loop Close #FN Regards Veena

Member Avatar for dtbradio
0
134
Member Avatar for anandarose

Hi, modify ur code this way, remove the do while loop and the opening of txt file. do not alter the select statemnet. Print "************************************" Print "* 1 - Search by number of bedrooms *" Print "* 2 - Search by number of bathrooms*" Print "* 3 - Search by …

Member Avatar for dtbradio
0
106
Member Avatar for Tiggey

Hi, Replace CInt() with Val(). What are these? and where are u initiating/Pulling data from? quiz1_f(6, 1) ...quiz1_a(1, 1) ..quiz2_a(1, 2) ? If they are not stored with proper data, u may not get proper results. Change the average finding code this way, stuav1.text = Format(((Val(quiz1_c(1, 1)) + Val(quiz2_c(1, 2)) …

Member Avatar for QVeen72
0
103
Member Avatar for nugget93

Hi, Clearify : What is server made in VB?? Tell if u r wanting to connect to a Database?? Regards Veena

Member Avatar for nugget93
0
73
Member Avatar for niks_crasher

Hi, Dim i As Long Dim sSQL As String sSQL = "" For i = 0 To lstSel.Items.Count-1 If i = 0 Then sSQL = lstSel.Items(i).ToString Else sSQL = sSql & "," & lstSel.Items(i).ToString End If Next Ur Query String will be s = "SELECT '" & sSQL & " …

Member Avatar for QVeen72
0
166
Member Avatar for octopus1991

Hi, For Greatest Common Divisor Between a and b, Simpler code wud be, Dim a As Integer Dim b As Integer Dim c As Integer Dim n As Integer Dim i As Integer If a<b then n = a else n=b end if i=1 c =0 While i<= n If …

Member Avatar for QVeen72
0
122
Member Avatar for bogeybrown

Hi, Just type the name in TextBox. and alter the code like this : Dim TStr as String TStr = "Select * from MYQUERY Where name Like '*" _ & txtSelect.Text & "*'" Data1.RecordSource = TStr Data1.Refresh Regards Veena

Member Avatar for bogeybrown
0
106
Member Avatar for sugarboy rider

Hi, If u r using a database, store First Date in a field and every time the user logs in, check for that date and Today's date. If difference greater than 30 then end the application. if u r not using database, create a log text file with hidden properties, …

Member Avatar for sugarboy rider
0
109

The End.