2,155 Posted Topics
Re: Yes I can. What do you have sofar. | |
Re: You should try Google as your friend :) Try the following - Sub OpenExcelFile() Dim oExcel As Excel.Application Dim oWB As Workbook Set oExcel = New Excel.Application Set oWB = oExcel.Workbooks.Open("C:\Documents and Settings\MyExcelFolderHere\Import.xls") oExcel.Visible = True Set oWB = oExcel.Workbooks.Open(sPath) 'Rest of code End Sub To run a macro contained … | |
Re: @zp18, start a NEW and your OWN thread by clicking [URL="http://www.daniweb.com/forums/newthread.php?do=newthread&f=4"]THIS[/URL] link. You will not get any help from members by hijacking others threads. | |
Re: This will make the connection for you. Change the detail as needed... Dim cnServer As ADODB.Connection Dim rsServer As ADODB.Recordset Set rsServer = New ADODB.Recordset Set cnServer = New ADODB.Connection cnServer.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _ & "SERVER=MyIPAddressOfServerHere;" _ & "Port=3306;" _ & "DATABASE=MyDatabaseNameHere;" _ & "UID=MyServerUsernameHere;" _ & … | |
Re: Are you using a data control or code to create your recordset? It looks like a data cobtrol, which I do not believe in because of its basic functionality. | |
Re: Have a look at [this](http://mdn.morovia.com/kb/Printing-2D-barcode-fonts-Visual-Basic-6-10095.html) link with sample code. Also helpful - [here](http://www.idautomation.com/font-encoders/visual-basic/) or [this](http://www.barcodingfonts.com/pdf/bar93.pdf) link. | |
Re: sshinde, This thread is over 6 years old. I doubt that anyone will respond to your question. Please open a new thread with your question and as much info as possible. We will gladly help from there. | |
Re: Your call to set the datasource of the grid is in the incorrect place. You are calling it whilst you expect there to be no records. [CODE]If rec_rs.EOF = False Then Set dbgrid.DataSource = rec_rs End If rec_rs.Close 'Change this to... Set dbgrid.DataSource = rec_rs ' irrespective of data or … | |
Re: Bad news, I know, but you will have to re-install vb6 and then start again. Save all your projects, un-install vb6 and then re-install. Good luck bud. | |
Re: Update will be something like - [CODE]RS.AddNew RS!MyFieldNameHere = Text1.Text 'and so on.... RS.Update[/CODE] Delete something like this - [CODE]RS.Delete 'Use bookmark etc for a specific record etc...[/CODE] Search - [CODE]RS.Open "SELECT * FROM YourTable WHERE TheFieldName LIKE '" & Text1.Text & "'", cn, adOpenStatic, adLockOptimistic[/CODE] | |
Re: Lets presume that you are searching for a id in coloumn 1 of your grid - Dim xString As String, xRow As Integer, xNext As Integer xString = txtSearch.Text For xNext = 0 To mshFlexgrid.Rows ''Use -1 if you do not have titles in the first row and data starts … | |
Re: Thank you for posting a tutorial here. :) You do however need to make sure that all of your code and setup data is correct... You have created 3 text boxes named nama, username and pass yet in your code you have Text1, Text2 etc. You have also closed your … | |
Re: @labq5, There are easier ways to make your form borderless. You do however need to open a new thread of your own. This was only a code snippet from 2009, I doubt it if anyone will answer your question. I'll reply on your new thread once it is open.:) | |
Re: I have ask that your post be moved to .Net. I'm sure someone over there will help. This is unfortunately vb4/5/6 forum.:) | |
Re: LOL, and so they all train to come play REAL rugby against the Springboks and Aussies. We usauly do let the world sort themselves and then throw the challenge out there to come play real rugby. (OUCH - a few feet stepped on now, I know) ;) ![]() | |
Re: As far as my knowledge stretch, the msgbox can not accept pictures... That made me develop my own message box which works wonders. Below is some code you can use to create your own message boxes. You can add pictures to your hearts content... In a module, add the following... … | |
Re: Ithink the part of creating a new report from CR is looking for files/want to save to files where you do not have access to. Which windows OS are you using? Do you have admin rights on that pc? | |
Re: a Lot of code which can be done in less lines using OOP. :) Try the following - eliminate LIKE in your statement and use the actual month selected. Because of LIKE you are getting other months as well because it contains characters that forms part of January... First off, … | |
Re: Do you HAVE to use the datacontrol? If not, there is a much easier way by just looping through the records returned... | |
Re: There are 2 ways to do this - 1. When your textbox looses focus, trap the error... If Not IsNumeric(Text1.Text) Then MsgBox "Numeric input only!", vbCritical, "Invalid Input" Text1.Text = "" End If OR, you can just delete the letter that was typed so it only accepts numbers... Private Sub … | |
Re: Your first question was answered. Please open seperate threads for the other 2 questions. It keeps the question and answers clear for future users. We can not allow multiple questions in one post. All other users, please answer OP's questions on his new posts and not here. Thanx. | |
Re: This should work - acd.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\192.168.0.10\YourPCNameHere\POS.mdb;Persist Security Info=False" acd.CursorLocation = adUseClient Make sure that the database is under your c: drive, not in any folders. That will eliminate user rights... Also change the ip address to what you have for your server. | |
Re: As per your new thread, your select statement was incorrect. Please correct to the sample I gave you there. If this is answered, please mark as solved, thanx. | |
Re: If there is no code under the listview double click event, it will not do anything. If you want it to NOT do anything, remove the code from the double click event... On single click, remove the code that lets the user edit teh data... It seems that you have … | |
Re: Change your select statement to - rsReport1.Open "Select purchase_date, BarCode, Price, ProductName, Quantity, TotalPrice From Dailyrecord where purchase_date = '" & DTPicker1.Value & "'", acd, adOpenStatic. adLockOptimistic | |
Re: ComputerHacker, firstly please read our posting rules. You need to open your own thread with your question/problem. This is a VERY old post that has been reraised from the dead, and normally we would not even reply on this. You are however a new poster, so I'll answer the basics, … | |
Re: The error means that rs has not been assigned. you need to set a new type for rs... dim rs as ADODB.Recordset Set rs = New ADODB.Recordset if that doesn't solve your problem, it lies with cn. do the same for cn... | |
Re: > IIf(Nz([AnotherFieldName],0)=0,3,[AnotherFieldName]) I'm not sure what the above is for... In vb6, open connection. open recordset. code should look similar to this - If rs!Fieldname1 = rs!fieldname2 Then ''code here to handle returned boolean of true Msgbox "field1 is equal to field2" End If | |
Re: I agree with you tinstaafl. When creating an application we think that it is running smooth, nothing will change. 6 months down the line the user wants additional features or something changed... It is so much easier to just work with blocks than entire pages of code. | |
Re: This is how I would've done it, I CONTROL the code then... Private Sub cmdSearch_Click() Dim sTrID As String Dim xTotal As Integer ''DO NOT USE TOTAL, IT IS A VB RESERVED WORD... sTrID = txtSearch.Text xTotal = 0 Set rs = New ADODB.Recordset rs.Open "Select Date_In, sTrID from Time_In … | |
Re: What database, access, MySql, MSSql? What field names in table for dates? What code do you have thus far? | |
Re: As Jim said, 2 If statements opened, never closed... | |
Re: Not exactly sure what you are asking here. :) Do you mean that when a textbox size is 2 cm long but you type "This is one veeeeerrrryyyy long text sentence, please fit in"you want the cursor to be at the end "fit in"? | |
Re: LOVED IT!! and shared, thanx ancient. All from MD5, Hash 1 - 100000237 to some personal credit card numbers, identity numbers, mothers name, dogs birth place and lastly the drop of virgin blood... :) | |
Re: Are you using macros inside Access, Access itself as the report generator or are you using vb6 to do the reporting etc? | |
Re: What sheet do you need to search from - excel? If you have problems uploading, just post your search code here. | |
Re: You will be using something similar to the attached app. | |
Re: Unfortunately we do not do others assignments here. Please see our posting rules. If you received an assignment with the requirements as stated, you should be fairly versed in vb6 already. You can use vb6 and databases. You can also use the reader to interact with your application in vb6. | |
Re: The problem is because you are referring to only the first coloumn - ListItems only returns the first. For any other coloumns after that you will need to call the SubItem as well... ListView1.ListItems(1).ListSubItems | |
Re: Youir error is here - > If .SubItems(19) = "Y" Then Your listview does not have a coloumn number 19 (20 - starts from 0), hence the error. Make sure you have the correct amount of coloumns... | |
Re: I'm not sure what you are asking here. upgrading what? long picture to another picture? | |
Re: Your database was saved in a different folder than you application installed folder (normally the case). Your app is trying to read from the database or the reposrts that is saved in a folder that you do not have permission to write or read from... Make sure that the database … | |
Re: You would have somethjing like this (not sure, you will have to play with the code a bit, have not worked on CR for quite some time now...) With CRV ''Where CRV is your crystal report name... frmEdit.Show 1 ''vbmodal End With This will go under the report click event. | |
Re: Try the following... hold1 = "[Username] like'" + txtUserName.Text + "'" hold2 = "[Password] like'" + txtPassword.Text + "'" Set Adodc1.Recordset = hold1 ''Or hold 2, what you want to use... Your error is referring to your recordset wich is invalid. Use hold1/2 as the recordset. | |
Re: I know there is a way by using javascript. Have a look at [this](http://www.htmlhelpcentral.com/messageboard/showthread.php?12261-JavaScript-No-Right-Click) link... Or [this](http://www.sapien.com/support/forum#/discussion/4149/disable-right-click-in-vbscript-/p1) link... | |
Re: Firstly read our posting rules. Please open your own post with your own question. Secondly, I have absolutely no idea what you are talking about in your question. What virus? What language? What's your code and error? | |
Re: It will update every time you click on your cmdUpdate button because you are telling the form to update. Add a cmdCancel button to your form. If the user do not want to update, they can click on cancel and then exit the form... cmdCancel_Click ''Write some code to clear … | |
Re: Wondering, I was wondering what you have coded thus far. Show us some effort and we will most definitely help you out with a solution. Please read the rules about asking questions at the top of any posted page - > Our Software Development forum category encompasses topics related to … | |
Re: Your Time_Out must update the already existing record that you created when the user clocked in... Private Sub cmdTimeOut_Click() Set rs = New ADODB.Recordset rs.Open "SELECT * FROM Time_Out WHERE Employees_IdNo = '" & txtEmployee_IdNo.Text & "'", cn, adOpenKeyset, adLockOptimistic ''rs!Employees_IdNo = txtEmployee_IdNo.Text - Will not need this, already existing... … | |
Re: Not sure what you need Bile... After the user found the file (via your code above), you want to open say a word document, picture etc? Seems that you will be making use of the shell command then. |
The End.