Search results

  1. C

    Sum(Round) gives incorrect value.

    Hi, I have along list of values of which i need to sum together. The issue i have is, with the list (sorry in advance): 3812.743271 326.475432 236.291316 224.359102 221.09061 221.037702 220.97087 220.913642 220.863603 220.802808 220.737501 220.673351 220.473682 220.390728 220.319768...
  2. C

    Incorrect Sum on Doubles

    I have a table of numeric values (Double, 6dp, Fixed), when I try to sum these together in a query I get incorrect results (e.g. 100.8 – 100.7 = 9.99999999999943E-02 instead of .01. I’ve tried experimenting with the data type, making them standard instead of fixed, using CDbl/CLng, aswell as...
  3. C

    Import Text file into VB(MS access) issue due to carriage returns

    Hi all I currently have a text file which is interpreting a number of columns as one long string, due to carriage returns (Chr$(13) i think?). I have been having trouble trying to import this text file into an MS Access table using VB code but cannot work it out. So far my script will read in...
  4. C

    Incoming string follows specific character format

    Im trying to make sure an incoming string follows the format ***-****** but the below line doesnt awknowledge values that do follow the format If val1 = "***-******" Then Where each * is a number or character. What am i doing wrong with this :s Many Thanks
  5. C

    Check Number of spaces in a string?

    Hi all, I'm trying to run a validation in some script to check a string and find how many of the characters (max string length of 50) are a space. Thus 'ACC1 NEWTYPE FLEET' would return a 3 is there a method you can suggest? Many thanks
  6. C

    Pick out dates and organise in specified columns

    Hi all, I currently have a table with values at certain periods. Does anyone know how i can use a query to create a new table that identifies the dates. E.g the first table is like: MEMREF, DATE, VALUE, STATUS AAAAA1, 01/01/01, 10.00, A AAAAA1, 01/01/01, 14.00, B AAAAA1, 01/01/01, 7.00, C...
  7. C

    Combine 2 rows into one?

    Hi all, I am currently running a query which takes values from 1 row, alters them and appends a new table but im now using data which often has several lines per member, where the additional lines contain information not found in the first line. So, for example, i have JAMES, WESTWAY, L17...
  8. C

    Writing table valuesd to specific positions

    Hi all In the below example, can anyone tell me how id A) Specify what position in the text document A2 is written? I want it next to A1 but starting at a specific position B) Force A3 to be written on a new Line, without moving onto the next member. Do Until rset.EOF = True...
  9. C

    VB DCount per ID instead of whole table?

    Hi all, Im trying to count the number of records i have within a table (per unique ID) where the content = "Y". Ive not been having much luck though, i was trying DCount but it only counts the number of ALL records within the table where Archieve = "Y". I actually want to count all the "Y"...
  10. C

    Max Seuqnce number with a Unique Reference?

    Hi all, Im having trouble with a database query, i have a table that has a large list of Reference numbers, sometimes duplicates. These are indicated by another column that counts the number of duplicates (sequence of the numbers). Ive been trying to create a quey that will retrieve the...
  11. C

    SELECT INTO error (probably small overlook)

    Currently have a series of select into statements which work fine for example: SELECT * INTO R_Tab1 FROM TABLE1 WHERE ID = USER_ID AND Grouping = USER_Grouping AND Ref = 'NewLine'; This is placing the whole line of the record into a variable. Now the issue im having is a select into which...
  12. C

    Max date in sql query issue

    Hi all, I know how to get the max date per ID with: select max(DDATE) from Table1 where ID in ('AA1', 'AA2', 'AA3', 'AA4') group by ID However, how can i retrieve all columns within the table based only on the max date? I know, by including all the tables column headings, it will...
  13. C

    MAX()+1 within INSERT statement

    Hi all, I have a table that i wish to update but am having trouble due to my value ItemNum. I need this to be the next highest (max+1) number in the column ItemNum (for a script, this is not an autonumber column). In essence what im trying to contsruct is: insert into TABLE1 (New1, Status...
  14. C

    Issue finding gap between two dates (text strings) in SQL

    Hi all, Having a lil trouble with a query. Im trying to returns results where the difference between OldDate and "2009-05-27" is less than or equal to 20 years. The issue i have is that OldDate is a text string (import from csv), and i dont believe CDate works in SQL. SELECT * FROM INFO...
  15. C

    VSFlexArray Control issue

    Hi all, Seems very hard to find any information on this. I currently have a populated flexarray control on a form but im unable to retrieve the values to save as an output, preferably a recordset to write the contents to a text file. Unlike with VSFlexgrid 3.0, you do not have access to the...
  16. C

    INSERT into last row of a table

    Hi, Hitting an issue with an Access table, im trying to insert a value into the last line of a table as a customised trailer but can't seem to enter it into the very last row. Im currently trying the criteria below but how do i link the recordset, having found the last 'occupied' row, to...
  17. C

    Tab control within tab control?

    Hi, Having some trouble with a Tab control, whenever i create two tab controls, one within the other, it shows that second control on each tabbed page where as i only want it contained on the tabbed page it was created within. Any tips would be appreciated.
  18. C

    view recordset gathered data (odbc) without a table?

    Hi all, Is it possible to display data built within a recordset, without first adding it into a table? I was hoping to avoid saving data internally but cannot think of a method to do this. This is in Access 97
  19. C

    String being outputted as a Date

    Hi all, Within my code i receive a string of a date e.g 20060701, which i manipulate to read 01/07/2006. The variables are Strings, the column of the Table the date is being inserted into are text, and the export spec im running displays it as text. The output shows the date + the time...
  20. C

    Alternate to Replace() in access 97

    Hi all, I currently have some code that works great in 2000 but i need to use it in 97. The issue i have is with Trim(Mid(Replace(strLine, "'", "''"), 12, 27)) The code reads in a name from a string in a text document and inserts it into a table via Docmd.Execute "Insert...". The...
Back
Top Bottom