Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: TTThio
  • Content: Threads
  • Order by date
  1. TTThio

    Recordcount returns -1 even after MoveLast

    Hi all, I just did a Select Unique to return a recordset. I'm using rst.movelast then rst.recordcount to return the total records. It keeps giving me -1 instead of the real number. I know it's not much , only 100, so how come it didn't work as it's supposed to be? Thanks ahead, Tin Tin
  2. TTThio

    How to query database based on a list values?

    Hi, I need help to built a query based on a list. I have 2 worksheets, the first one contains some list of datas. The second one will be populated with data from database which is not in the first worksheet. I tried to create both queries directly in the code, such as query data where...
  3. TTThio

    Missing Right Parenthesis???

    Hi all, I've been overwhelmed with this for 2 days, still cannot find what is missing. Perhaps you can help me with this. I'm using pass-through SQl to take data directly from Oracle DB. Here's the result from debug.print vSQL: [b]SELECT Name, Account_ID, Account_Team...
  4. TTThio

    Concatenation

    Hi guys, does anybody know how to concatenate the following: i = 1 SQL = "SELECT field FROM table WHERE field = '0" & i &"'" It does result in string : SELECT field FROM table WHERE field = '01' but then in setting the recordset, I got error: "invalid relational...
  5. TTThio

    Subform Doesn't Display As It Should!

    Hello, I have a strange problem here. In the main form, I have 2 subforms. The record source is query which parameter is based on the main form combo box selection. One subform behaves really odd. After I make a selection, the subform doesn't display any related data. Yet, when I open the...
  6. TTThio

    Call an event procedure from other procedure

    Hi guys, does anybody know how we can call an event procedure from within another procedure. For example, If..... Then Call cmdOpen_Click I've tried to apply it like calling regular routine but it didn't work. Any idea? Thanks ahead, Tin Tin
  7. TTThio

    Refering to certain record in Access

    Hi folks, is there a way to refer to certain record without using the bookmark property. For instance, if in Excel, by using rowindex, we can go into that cell record directly. Exp: rowindex = 1 rst.movefirst .cells(rowindex,1) = rst("A") rst.movenext rowindex = rowindex + 1...
  8. TTThio

    Deleting chart series using VB code?

    Hi folks, I've posted this topic previous days ago, but no response, I wonder if it's because I posted it late. So, here's the post again, I really hope someone could help me with this. I'm having a chart that was build manually. With the unpredictable change of data range (depends on the...
  9. TTThio

    Checking if result is negative

    Hi, does anybody know how to check if the result is negative so that we can perform certain action? Thanks ahead, Tin Tin
  10. TTThio

    Removing series from chart with VB code

    Does anybody know how to delete/remove the chart series through code instead of doing it manually? I'm creating a chart which series values depends on a query result. I've previously creating it manually, but along with the changes in the query result, I intend to add seriescollection...
  11. TTThio

    Anybody familiar with codes for chart in excel?

    Hi, I'm kind of stuck right now. Trying to set the name of the series of a chart but keeps getting error 1004 "Unable to set/get Name property of the series class" In chart(1), I had previously created 12 series (months) I do debug.print worksheets(1).chartobjects(1).chart. _...
  12. TTThio

    Returning rs.recordcount when it's -1

    Hi, I'm taking data from ODBC. The rs.recordcount return -1 (Can't be determined). Is there another way to return the real number of records count? Thanks a lot. Tin Tin
  13. TTThio

    Problem in openrecordset method

    Hi, could someone let me know what is wrong with this code, that when I stepped into it to debug, always got error message 13 (Type Mismatch) after the sSQL. My table is a linked table from Oracle database. Thanks ahead. Sub try() Dim db As Database Dim rs As Recordset Dim sSQL As String Dim...
  14. TTThio

    Calling procedures in code module or another project

    Hi, could someone let me know how to call procedures located in code/standard module(.bas) or in module of separate project (exp .mdb/.xls)? I've read about setting reference first of the project if you want to call another project's procedure, but when I go to the reference window, it only...
  15. TTThio

    create new workbook from a module based on existing workbook

    Hi folks, I really need a help here. Newbie in Excel-VB My bos wants me to have a general module, where from there we can create a workbook based on existing workbook/template. Can somebody let me know how to do this? Or any reference? Thanks a lot, Tin Tin
  16. TTThio

    Speed up data fill-up in excel

    Hi guys, do you know how to speed up process of filling up fields with recordset? I'm using a lot of For..Next , and noticed that the more the rows/columns to fill up, the slower the process. Is there another way to handle this problem? Thanks ahead, Tin Tin
  17. TTThio

    Inserting/adding column without losing code

    Hallo, can we insert or add column without losing codes that is applied to certain column? For example, in the code: range ("C1:C500").value = X then we insert a column between B & C, as a result, the previous column C is moved to the right and becomes column D. I would like the...
  18. TTThio

    Duplicate ranges name

    Hi there, is there a way to name 2 different ranges in different worksheets with the same name to be able to do some looping in the code? Just like column A is named as it is in all worksheets. I appreciate any help. Tin Tin
  19. TTThio

    Refering to worksheet 'object' name

    Hi folks, could you help me with how to refer to a worksheet object name? I see in the project explorer that Microsoft Excel Object has two names to refer, object name, and property name exp.: SHEET1(sheet1). Is it possible to set the object name (SHEET1) using code? So far I'm just able to...
  20. TTThio

    How to save new data back to recordsource after auto fill form?

    Hello, In the form, I'm using recordset to calculate data. Then auto fill the form with that data by: frm.value1 = MyValue1 frm.value2 = MyValue2, etc. All these values are dipslayed in the form (datasheet view). However, when I preview report, the last record didn't show calculation result...

Part and Inventory Search

Back
Top