Search results

  1. D

    compare as percentage difference two zeros cause error

    Hi I have a simple query below to find the percentage difference between 2 long integer columns. However I find that if any of the 2 values in a row are both zero it causes an error in the result for this record and if I run it from a VBA module it causes an overflow error and stops the routine...
  2. D

    Run query on user defined table name

    Hi I import a table into access using transfer text with the code below. The code asks the user for the name of the table at runtime. I then want to run a query on the table with the same code but how can I do this if the table name is defined by the user. Thanks Option Compare...
  3. D

    IIf function to make a country code

    hi I have a table with a column [countries] ie England, Scotland, Wales. I was trying to write SQL to make a new column with just a code for the country. So all occurences of England would be 1, Scotland would be 2 etc. I suppose I could duplicate the column and run an update query. But...
  4. D

    add 2 leading spaces to text files

    Hi I wonder if anyone can help me. I have a bunch of CSV text files (over 400) and want to add 2 leading spaces to the beginning of each row. So the rows would go from this to this. (quotation marks are only for format purposes)...
  5. D

    default date field to 01/07/yyyy

    Hi! Help needed please. I have a date field which look like this: test1 Field3 00/00/1939 00/00/1993 00/00/1966 00/09/1997 00/00/1976 00/03/1998 00/00/1991 What I am attempting to do is to update all the days and months to 01/07 but leaving the year intact. I have thought of the...
  6. D

    command button specific to form record

    Hi I have a form where I have added a command button which opens a saved notepad file when you click it. However the command button performs the same action whichever record of the form you are on. What I want is a command button specific to only one record of a form, not the same across...
  7. D

    open notepad file with on click event

    Hi I can open notepad application with the above code but what the code for opening a specific saved notebook file with a command button on a form. The notebook file is saved on c:\ for example. Or.... It is just a list of numbers I want to open in notepad is there a nicer way to open a...
  8. D

    import csv files to multiple tables

    Hi I'm using the transfer text method to import multiple csv files, 10 or more. DoCmd.TransferText acImportFixed, "Import_Specification", "table_name", strFolderPath & objF1.Name, False as it is it only appends to one table "table_name" , so how can I import each file to a seperate...
  9. D

    add '0' to the beginning of text string

    Hi how can I write an update query which adds a '0' to the beginning of a text string in a column only if the text string has 4 characters. If the string is 5 characters I don't want the '0' added. Thanks
  10. D

    automate link to multiple text files

    Hi I have 400 .txt files in fixed width format. I would like to import these into access as linked files (as the total file size is 80 GB.) I would like to automate the process of course as it would take too long to link each file individually. The access field specifications are 10 fields...
  11. D

    replace null value with text from another column

    Hi I have 3 columns . Column A and Column B and column C. Column A is my unique identifier. Column B is fully populated ie no null values. Column C has some null values. Where column C has null values I would like to add the corresponding value from column B. Thanks
  12. D

    form based parameter query with multiple values

    Hi this is a two part problem really. I have made a form based parameter query which uses a wild card search. All data in the 'table' is in text format. At the moment the form has 3 parameters keyword1, keyword2 and keyword3. The sql for this is below. SELECT column1, FROM table WHERE...
  13. D

    select data between 2 date columns

    I have a table with 2 date columns which are different for each record. I have another column of numbers where I only want to select '1' for example if it is between the dates in the 2 date columns. I guess I should BETWEEN or DATE RANGE but I can't make it work with sql. Help appreciated Thanks
  14. D

    parse based on first number

    Hi. A quick query. I have a field which looks like this. Valproic Acid_Cap E/C 150mgValproic Acid_Cap E/C 300mgValproic Acid_Cap E/C 500mgValproic Acid_Tab 250mgValproic Acid_Tab 500mgConvulex_Cap E/C 150mgConvulex_Cap E/C 300mg I am simply looking to parse into 2 columns. Although I...
  15. D

    case-sensitive sorting (hex problem)

    Hi! I got this used defined function off the microsoft online access (see below). The purpose is to change an ascii string into hex characters so they can be sorted case-sensitively. ******************************************************** Function StrToHex (S As Variant) As Variant ' '...
  16. D

    case-sensitive sorting (hex problem)

    Hi! I got this used defined function off the microsoft online access (see below). The purpose is to change an ascii string into hex characters so they can be sorted case-sensitively. ******************************************************** Function StrToHex (S As Variant) As Variant ' '...
Back
Top Bottom