1,130 Posted Topics
Re: [code] Dim comSave As New ADODB.Command [B][COLOR="Red"]Set[/COLOR][/B] comSave.Activeconnection = connDB [/code] Good Luck | |
Re: After that, you will need to use the Package and Deployment Wizard to distribute your application or you can use Inno. Good Luck | |
Re: UPDATE Table1 SET Field2=Table1.Field2-1 WHERE Field1=Value Where Field1 = unique value to identify record and Field2 = the value you want to decrement by 1 As for creating an invoice there are several ways. Datareport, Crystal Report, or one of your own design via the Printer object. But to be … | |
Re: A couple of ways... ... = Trim(AfsugRS(j - 1)) ... = AfsugRS(j - 1) & vbNullString Or you could try an update statement... strSQL = "UPDATE Table1 SET Field1 = " & vbNullString & " Where Field1 = " & vbNull (or something like that as I don't remember the … | |
Re: You would need a service running on each server and you would have to call the service to feed you the text file. Or you can use the UNC path for each server to where the file is but you will have to have permissions to access the folder and … | |
Re: Are you asking how to create controls at runtime to allow your users to view all of the returned results? Set textboxes indexes to zero (0) and do something like... [code] Dim TextBoxCounter As Integer Rs.MoveFirst Text1(0).Text = Rs.Fields("Category") Text2(0).Text = Rs.Fields("TheSum") 'instead of above AS [Total of Category] Rs.MoveNext … | |
Re: From VB's help files... [B]Project Limitations[/B] A single project can contain up to 32,000 "identifiers" (any nonreserved keyword), which include, but are not limited to, forms, controls, modules, variables, constants, procedures, functions, and objects. [b]Note that the actual number of identifiers is limited to available memory[/b] You can however get … | |
Re: There are several technologies available to use to send email with vb6 and if you search the web you will find many examples like this search... [url]http://search.yahoo.com/search?p=vb6+email&fr=yfp-t-152&toggle=1&cop=mss&ei=UTF-8[/url] Good Luck | |
Re: The code that you show needs to be within a procedure. Either a sub or function like form load, it cannot be in the general declarations section of a form or module. Good Luck | |
Re: Do you keep your connection to the database open for long periods of time? Unfortunatly, ado has the tendency to drop connections that are held open for long periods of time and if it is really ado's fault or the network or the server itself who knows. It is just … | |
Re: Okay,... You are trying to do two unrelated things with one query statement... and your query structure is incorrect... This would be correct... Statement = "SELECT * FROM tblAsset WHERE AssetID = " & txtAssetID.Text if a number field is what you are querying against... Now as for the rest … | |
Re: Yes, a module with public declared variables would be the easiest bet. Then in form load open the database and in form unload close the database. Good Luck | |
Re: check to make sure that you did not accidently change the windowstate property in the properties window. THen if you really want to make sure, add... Me.WindowState = vbMaximized to the forms load event. Good Luck | |
Re: Yes,... Do you know how to use the menu editor? If so, then the command you need to know is PopupMenu. Good Luck | |
Re: Check out the API's CreateFile (to get the handle to the file (read)), GetFileAttributesEx (to get the creation, accessed, and modified datetimes) or the GetFileTime API to do the same, and then finally FileTImeToSystemTime to convert the 64bit file time to system time format. Good Luck | |
Re: When you declare/pass an arguement to any sub/function you need to declare the type (as string, integer, recordset) From what I am looking at it seems that you are trying to pass the recordset object named suppliers... i.e. Dim Suppliers As ADODB.Recordset '.... Public Sub MySub(ByRef MyArg As Suppliers) '<this … | |
Re: Use the data form wizard. Search my handle and those keywords to learn how to invoke it, use it, and what to do with it. Good Luck | |
Re: Single ticks (Mary's little lamb)... [CODE] Dim S As String, strSQL As String S = "Mary's little lamb" strSQL = "INSERT INTO Table1 (Field1) VALUES (" & Replace(S, "'", "''") & ")" '... [/CODE] Quotes should be the same but it is hard to tell without actual values. Good Luck | |
Re: Okay, I think you are over thinking this... Now, if I understand you correctly you want the numbers (0 to 25) to represent A to Z. So when the user enters any number from 0 to 25, clicks the button, you show the letter from A to Z. [code] Private … | |
Re: Use the same methods as I have described and given examples of in your other threads that already solve this problem. | |
Re: Well the between operator is for use on one field so... SELECT * FROM Table1 WHERE (Date1 AND Date1 BETWEEN DTP1.Value AND DTP2.Value) AND (Date2 AND Date2 BETWEEN DTP1.Value AND DTP2.Value) As for three dates... SELECT * FROM Table1 WHERE DATE1 = Value1 OR Date1 = Value2 OR Date1 = … | |
Re: Format function, FormatDate Function... Good Luck | |
Re: How does it not work? and should that not be ([exam fee] [B][COLOR="Red"]+[/COLOR][/B] [other fee]) Good Luck | |
Re: Any way you want to... prime numbers base 36 some sort of encryption Good Luck | |
Re: Are you sure you are using Visual Basic 6.0 and not VB.NET or VBA (access, word, excel,etc)? | |
Re: If ID is a numeric field then... [CODE] conn.Execute "Insert into Class_Nursery (ID) values (" & Student_ID & ")" [/CODE] Good Luck | |
Re: Now without the report designer application and then that would not be through vb. Good Luck | |
Re: does not matter, debug.pring statements are ignored by the compiler so this is not your problem. Keep Looking Good Luck | |
Re: Tools>Options>Editor Tab>Put check next to require variable declaration>click ok. Just like if you... Dim I As Integer In a lot of subs for looping but then make the mistake of doing Dim i As Integer Someplace, they all change to the lower case Glad you have posted this thread as … | |
Re: Server name is the name the of the computer that the service is running, in this case the service is sql server and you need to enter the computer name. Good Luck | |
Re: Once again insert into (field) value (thevaluetobeinserted) Good Luck | |
Re: First create the new table from one of the other tables... SELECT Table1.Field1, Table1.Field2, Table1.Field3 INTO tmpTbl FROM Table1 Then insert the records from the second table INSERT INTO tmpTbl (Field1, Field2, Field3) SELECT Table2.Field1, Table2.Field2, Table2.Field3 FROM Table2 Now, select the records from the table SELECT * FROM tmpTable … | |
Re: Create temp table with insert into from one table, use insert into from other table, then select records from temp table. When done, delete temp table if you want or keep it around and reuse it in future. Good Luck | |
Re: use the dateadd function Good Luck | |
Re: You will need to seperate the printer setup from the actual printing... [code] printer setup stuff do while rs.eof = false printer.currentx = value printer.currenty = value printer.print loop printer.enddoc [/code] Good Luck | |
| |
Re: Dim MyValue As Double 'for decimal places else integer if inventory not to execeed 32k+ or then long MyValue = MyValue + Quantity '5 + -5 = 0 5 + 5 = 10 Update Table Set field = MyValue Or you can just keep a recordset in memory and then … | |
Re: You may also have to prefix badge id with one of the two table names since you have an inner join on badge id. Good Luck | |
Re: Click event of the option buttons Good Luck | |
Re: While this tutorial is about using the clipboard to move data from an excel spreadsheet to a flexgrid, the information on opening the spreadsheet is in there. [url]http://www.vbforums.com/showthread.php?t=393082&highlight=excel+tutorial[/url] Good Luck | |
Re: [code] "WHERE ALRAJHIBANK.ID = " & itemID [/code] Good Luck | |
Re: Okay, several way in which to do this but let me start at the bottom and work my way up... Yes it is possible to redimension arrays based upon a variable value... [code] Dim MyArray() As Integer Dim MyValue As Integer MyValue = 10 ReDim MyArray(MyValue) As Integer Debug.Print UBound(MyArray) … | |
Re: SendKeys generates the error because MS in it infinite wisdom missed it/did not want to support it/thought it could be used maliciously/who freaken knows. To get around it UAC needs to be disabled. May still generate an error in IDE but not with exe. RunAs Admin and several other ways. … | |
Re: Unfortunatly no. There are three layers to forms and containers. The back layer is where the forms graphical methods are drawn. The next layer layer is where graphical controls are rendered and this is where the image control lies(controls with no hwnd). The top layer is where windowed controls are … | |
Re: One would think that those newer DB have an upgrade wizard of some sorts (MS Likes Wizards), and one would think also that you could detach your database from 2k and then attach it to 2k5 or 2k8. Good Luck | |
Re: once again... SQL = "INSERT INTO TableName(Field1Name, Field2Name, ...) VALUES(" & val(text1.text) & ",'" & text2.text & "')" Where TableName is the name of your table Where Field*Name is the name of the field you are going to add data to Where val(text1.text) is adding a numeric value to Field1Name … | |
| |
Re: 6th line down has an exit sub right after the end if on line 5. From what I can tell this is executed so the rest of the code is not. Also, your inner join query is incomplete and will/should raise errors when you attempt to try to open it. … | |
Re: Use the additem method put a few items into a listbox. Press CTRL+BREAK and use the immediate window to find your answers. ?List1.List(1) ?List1.ItemData(1) List1.Selected(1) = True ?List1.ListIndex Now, you will notice that list and itemdata return different string because one is zero based and the other is one based. … | |
Re: Why go through winsock? You don't need to unless you are trying to do this over internet (ie. not lan) and then if you are doing this over the internet then there are many technologies that will allow you to do this via a thin client (think asp). Also, if … |
The End.