652 Posted Topics
Re: [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 | |
Re: Hi, Simply use Text1.SetFocus Regards Veena | |
Re: Hi, Try try writing ur code in Validate Event. This Event occurs just before changing the currenct record. Regards Veena | |
Re: Hi, Text1.Text = Format(Date, "dd-mm-yyyy") Text1.Text = Format(Now, "hh:mm:ss") Regards Veena | |
Re: 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 … | |
Re: 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) … | |
Re: 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 | |
Re: 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] | |
Re: Hi, Use "Crystal Reports" or "Data Reports" Regards Veena | |
Re: 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, … | |
Re: 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 | |
Re: 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 … | |
Re: 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] | |
Re: 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 ' … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 | |
Re: Hi, Use this connection string for SQL Server : "Driver={SQL Server}; Server=ServerName; Database=myDataBase;Uid=myUsername;Pwd=myPassword;" Regards Veena | |
Re: Hi, Use this : Picture1.Picture = LoadPicture("C:\MyPict.bmp") Regards Veena | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. … | |
Re: 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 ![]() | |
Re: 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 | |
Re: 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 | |
Re: 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 | |
Re: 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 … | |
Re: 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 | |
Re: Hi Sweety, This Form is for u.. Down Load this attachment. if there is any problem, let me know Regards Veena | |
Re: 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 … | |
Re: 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 | |
Re: HI, Use this Set Attribute this way: SetAttr "C:\MyText.txt", vbReadOnly Regards Veena | |
Re: 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 … | |
Re: 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 | |
Re: Hi, Use MsgBox "My program Is In drive : " & Left(App.Path,1) Regards Veena | |
Re: 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 | |
Re: 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 | |
Re: 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", … | |
Re: Hi, Use DoEvents with a for loop For i=1 to 100 DoEvents Next Regards Veena | |
Re: 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] | |
Re: 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 | |
Re: 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 … | |
Re: 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)) … | |
Re: Hi, Clearify : What is server made in VB?? Tell if u r wanting to connect to a Database?? Regards Veena | |
Re: 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 & " … | |
Re: 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 … | |
Re: 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 | |
Re: 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, … |
The End.