Search results

  1. T

    Sorting By Subtotal Descending ?

    Hi, Would anyone please be able to advise me if it is possible to create a query that will produce output where the order is sorted by a subtotal descending? I have a list of suppliers and their regional offices and wish to obtain a list of suppliers and regional offices where the list is in...
  2. T

    Changing Empty Field Format To AutoNumber With Macro

    Just over a million records. I increased the swap file to 8gb but still get the error message. Rgds Growlos
  3. T

    Changing Empty Field Format To AutoNumber With Macro

    It will be a regular occurrence. I have a macro that imports data from external sources and makes tables etc. For one on these tables I want to insert an autoincrement field AFTER I have imported the data. The whole process is run by a macro from a button on a form and I want the insertion of...
  4. T

    Changing Empty Field Format To AutoNumber With Macro

    jdraw, Thanks for the tip re the reference, I now have the code in a module and it is OK with a check from Debug/Compile. Do I need any declarations etc so that it will run, all I have is the exact code pasted into a module, no declarations or anything els. Also, how do I get it to run...
  5. T

    Changing Empty Field Format To AutoNumber With Macro

    I pasted the above code into a module then checked it using the Debug/Compile option and got a "User Type Not Defined" error message from the 2nd line of code "Dim db As DAO.database" I am using Office 2003 with the access file format set at access 2000 and have the following libraries ticked...
  6. T

    Changing Empty Field Format To AutoNumber With Macro

    jdraw, Would you please be able to let me know how I would call up that code from the actions available to a macro? Would I need to paste the code into a module and run the module from the macro? My VBA skill is practically nil so any help with storing and running the code most...
  7. T

    Changing Empty Field Format To AutoNumber With Macro

    Galaxiom, Thanks for the link. The datatype needs to be AutoIncrement and then it should run OK. However, I have come across 2 issues when running the query, the first of which I resolved. Firstly, I got the "File Sharing Lock Count Exceeded" error message which I resolved by editing the...
  8. T

    Changing Empty Field Format To AutoNumber With Macro

    Hi, I have used a data definition query to add a new field to a populated table and set the format of the new field to number. The new field contains no data but other table columns do contain data. I would like to be able to change the format of the new field from Number to AutoNumber so...
  9. T

    Adding Auto Number Field To Table Via Data Definition Query

    I tried to create a data definition query to add and populate an auto number field using the SQL pasted below in an SQL query, however, I keep getting a syntax error with the code? Alter TABLE T_Sales ADD COLUMN SalesID NUMBER Alter TABLE T_Sales Alter COLUMN SalesID (1000,1) Even after...
  10. T

    Adding Auto Number Field To Table Via Data Definition Query

    Hi, Would anyone please be able to advise me if it is possible to add and populate an auto number field to an existing table using a data definition query? If it is possible any help with the SQL would be most appreciated. Rgds Growlos
  11. T

    Sequential Numbering Of Multiple Records With Same ID ?

    vbaInet, Thank you for the code, I will try it out. Rgds Growlos
  12. T

    Sequential Numbering Of Multiple Records With Same ID ?

    Yes, the [Mth-Yr] field is sorted in correct date ascending order. The work is required in connection with some other tables and queries and it is not for a report. Thx for your reply Rgds Growlos
  13. T

    Sequential Numbering Of Multiple Records With Same ID ?

    Hi, Thanks for the replies. I have just realised I have a better field than the separate [Year] and [Month] fields. I have an actual date field named [Mth-Yr] with data in the format of: [Mth-Yr] 01/03/2006 01/04/2006 01/05/2006 All the monthly values are set to the 1st day of the month...
  14. T

    Sequential Numbering Of Multiple Records With Same ID ?

    Hi, I would be grateful for any help on how I can sequentially number some table records where there are multiple records with the same ID. Using the table presented below as an example: T_Customer_Matrix [Customer ID], [Year], [Month] WP-27, 2006, March WP-27, 2006, April WP-27, 2006...
  15. T

    Match Date In TableA With Date Range In TableB

    Hi, I have 2 tables, T_Purchases and T_Discounts and what I hope to do is to use the [ProductID] and [PurchaseDate] fields from T_Purchases in a query that will lookup a discount rate from the T_Discounts table. The tables and fields are as below: T_Purchases [ProductID],[PurchaseDate]...
  16. T

    Code To Add and Name New Field To Table ?

    Bob, Many thanks, it is all working perfectly now after selecting the DAO Library (3.6), your help is most appreciated. Rgds Growlos
  17. T

    Code To Add and Name New Field To Table ?

    Bob, Oops, novice error, I actually made sure that the name of the module was the same as the name of the function. However, I have now renamed the module and kept the name of the function. The macro line now activates the function, however, I then get a VBA compile error. I am sure that I...
  18. T

    Code To Add and Name New Field To Table ?

    Bob, Many thanks for the pointer re how to activate the function. I have place the runcode command as a line in my macro and entered the arguments etc, however, when I come to run the macro it halts at that line with the message box: "The expression you entered has a function name that...
  19. T

    Code To Add and Name New Field To Table ?

    Bob, Many thx for the code. I have a question due to my lack of knowledge in this area, if I wish to run the code/function using a row in a macro how would I get the "uAddFunction" to work, presumably, I have to add the table name and new field name to the function to get it to work ? I...
  20. T

    Code To Add and Name New Field To Table ?

    Bob, The table that I wish to add the new field to is automatically created from a large set of excel files via a macro "TransferSpreadsheet" command. The field names in the table are preset in the excel workbooks that come from data sources outside of my control. Once all the excel...
Back
Top Bottom