Search results

  1. P

    docmd.transferdatabase

    The SQL will be something like: INSERT INTO SSM ( Field1, Field2, Field3 ) SELECT [New table].Field1, [New table].Field2, [New table].Field3 FROM [New table]; Change the new table name and field names to match your own. Easier if you let access create the sql for you: create > query...
  2. P

    docmd.transferdatabase

    Are you using a form and want to click a button to run this? If not just create an append query and run it. Need more details on what you're trying to do.
  3. P

    docmd.transferdatabase

    That's just code to run a query. Personally I'd rather create my own query in access then use DoCmd.OpenQuery "...." to open / run it rather than inserting the sql in the code.
  4. P

    Calculating Age Range

    Was it not documented in 2000 as well? Perhaps not but yes, it's not documented any more but it still works in every excel version. Not sure why it's not documented though, seems odd.
  5. P

    Calculating Age Range

    Your original formula was correct, this is not. As it's numbers you're dealing with, it should not have quotes. Quotes are mainly used to represent text. Better it's far better having more functionality and flexibility for future use with the data. It's the forumla of choice for most people...
  6. P

    Calculating Age Range

    There is nothing wrong with : =IF(AH2>80,"80+",IF(AND(AH2<81,AH2>64),"65-80","Under 65")) What if you remove any formula in AH2 and just type a number does it work? Edit: It does work if you just enter a number, the problem is with: =LEFT(YEARFRAC(AG2,TODAY(),1),2) I propose you use...
  7. P

    Runtime Error 462 - VBA Not Releasing Word

    Try adding oApp = nothing after oApp.Quit. If that doesn't work try : oApp.Application.Quit oApp = nothing instead of oApp.ActiveDocument.Close oApp.Quit
  8. P

    Run-Time Error 91 trying to create recordset in VBA

    Having a quick look at the code it seems fine, I would think your problem lies within the query.
  9. P

    STOP: Do you want to save changes to the design of form 'Chart1'?

    This may give you a better insight to the problem, although there may not be a solution. http://social.msdn.microsoft.com/Forums/en-US/accessdev/thread/817e24aa-9ff2-4f13-bf1a-bbd073590bac/ When you click on another tab it automatically closes the other tab which prompts the save.
  10. P

    Deleting duplicate records

    You need to build a query or queries to do that. Then you just enter a line of code to execute the query at the point you mentioned.
  11. P

    Import and Match Text Files Automatically

    That's not possible, well not practical at least. You should create a dummy table to hold the imported data, check the ID, copy the records which are new to the other table you have. Move all the imported data to the original table and delete the dummy table or leave it?
  12. P

    Import and Match Text Files Automatically

    Ok, assuming all records have a customer ID, query the two tables checking for IDs not in the new table. It should be an append query to copy those records into that seperate table.
  13. P

    Import and Match Text Files Automatically

    I wouldn't create a macro for that, just code it in a button. Example for importing a text file: DoCmd.TransferText acExportDelim, , "TableName", "c:\.......\TextFile.txt", True Change the parts in red to match your info. Tablename is the name of the table the data will be imported to. True is...
  14. P

    Access 2007 access control is my showstopper :-(

    Try Debug > Compile first before trying to convert to ACCDE.
  15. P

    Exclude Records for printing

    Will only 1 record be excluded or can multiple be excluded?
  16. P

    Converting text to time

    http://stackoverflow.com/questions/7481309/vba-issues-converting-string-to-date-using-format-or-cdate This should solve your problem.
  17. P

    Missing Records from report

    What if you try: SELECT * FROM Signals
  18. P

    Export Query Data to Excel Range

    I would do something simple like: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Query1", "C:\Users\u549032.RRLOCAL\Documents\SABRe deployment governance PSSU.xlsx", True This would replace all the code you have there! It depends what you want to do, this may not be what you need.
  19. P

    Export Query Data to Excel Range

    Try this: MySQL = "SELECT Query1.Tracker FROM Query1 WHERE (((Query1.Tracker) Is Not Null));" I don't actually know what Query1.Tracker is or Query1, this is not how I would get values from a query. Did the book show this? Maybe someone else here can help you.
  20. P

    Export Query Data to Excel Range

    You haven't got a space before FROM and WHERE.
Back
Top Bottom