Search results

  1. A

    Extracting a date from Short Text

    I'm importing data from eBay, Amazon and my own website into individual tables in Access. I'll then simplify each table and create queries which pull out the common data fields (such as transaction date, SKU, quantity etc etc) and append these all into a master table so that I can analyse sales...
  2. A

    Linking non-related things

    I have a problem that I don't how to get round, and I feel that VB is likely to be the answer here. My database imports files in the format shown above - this is fixed as it's produced by another system which has no flexibility in the output. I only need the 4th line, which is easy to isolate...
  3. A

    Smashing Two Things Together

    I have two great bits of code, which work well in Excel and Access. This works well in Excel to identify gaps and close them up for me. Thank you @Gasman Sub Tidy_Address() Dim iLoop1 As Integer, iLoop2 As Integer, iLastRow As Integer iLastRow = ActiveSheet.UsedRange.Rows.Count...
  4. A

    Identifying Gaps

    I have an import template for one of our system which requires all of the address lines to be 'aligned left'. It's a pain, so I wondered if there's a formula which could identify gaps where there is a blank cell. For example, between Smith's Wood and Birmingham below.
  5. A

    Using a Value in an Export

    I feel like this might not be possible, but how can I use a value from the query to create a dynamic file name where I've indicated [VARIABLE HERE] in the image below? The function makedir() will have created the dynamic folder name, ready to be used.
  6. A

    Not Looping as I expected...

    The code below isn't functioning as I expected it to... In short, I've added in the 'While Not rs. EOF', down to 'Wend', in the expectation that it would loop through all the records in my query and drop them all into the text body of the email that I'm sending. Oddly though, the only record...
  7. A

    Stripping Non Ascii

    I'm using the code below to strip certain non ascii characters in a query. It works nicely, apart from where it comes across a single quote. I understand why it's breaking, but I don't understand how I'd alter the function below to cope with single quotes in the fields that it's looking at...
  8. A

    Summing Across Fields

    Evening All, I have a bit of a conundrum here. Have a look at the attached Excel file. Columns C-Q show the stock which is committed for despatch on days 1-14. Column B shows the stock which is available. The yellow highlighted cells in J3 and N4 show the days on which there will be no stock...
  9. A

    424 Object Required

    I'm getting a 424 Object Required error when I try to run this. Attempting to debug by Google, but I can't see where I'm making an error - guessing it's in the syntax around rs.fields. Public Function WriteToExcel() Dim rs Dim db As DAO.Database Dim oExcel As Excel.Application Dim...
  10. A

    Write to Excel - Sharepoint

    I'm using the code below to write into Excel. I know that I don't need all the Recordsets, just haven't tidied it up yet. The problem that I'm experiencing is that although I can write into Excel without issue, the Sharepoint Excel then becomes locked and there seems to be no way to 'kill'...
  11. A

    Looper!

    How can I adjust this code to loop through each row in a query and send an email for each row? Public Function SendEmail() Dim rsID As DAO.Recordset Dim rsDT As DAO.Recordset Dim rsDR As DAO.Recordset Dim rsCD As DAO.Recordset Dim rsCN As DAO.Recordset Dim rsPN...
  12. A

    Exporting a Row at a Time

    Can Access write a new row into an Excel spreadsheet, or does it have to overwrite the entire sheet each time?
  13. A

    URL Encoding

    At the moment I have a database which churns out 4 columns of information into an Excel sheet. In this sheet, I have a formula which concatenates the information, and then uses a very useful Excel plugin called SEOTools, to create a hyperlink with all the necessary URL encoding. Whilst this is...
  14. A

    Splitter!

    I'm using the code below in a database which I've inherited. It works beautifully to split long strings on a pipe delimiter and push the split values and the 'Source/Medium' values into a table. However, the origin table has an autonumber in a field called 'ID'. I'd like to pass this to the...
  15. A

    Identifying 'Groups' in A Query

    Due to a quirk of our hateful website, multiple delivery address orders are split into separate orders, despite the fact that they are one transaction. To be able to analyse the data in access, I really need to understand transactions, rather than orders as the number of orders is misleading...
  16. A

    System Resource Exceeded

    Bit of a strange one... I've been building a few databases this week, none of which are overly complex. They all happily run on my i5 8GB laptop, but having moved them to run on an i7 16GB, I now get a 'System Resource Exceeded' message each time they run.
  17. A

    Export Individual PDFs

    I use a database to import data, which is then validated and reformatted. At present, the information is exported to Excel, which is then imported into Word in a MailMerge. I use a plugin in Word called 'Split the Merge' (or something like that), which takes my MailMerge and saves individual...
  18. A

    Export to Excel - Multiple Worksheets

    I have 4 crosstab queries which I can export successfully to .xlsx, using ExportWithFormatting in a macro. However, I'd really like to be able to write the first crosstab to a new workbook, then append the following 3 crosstab queries as subsequent worksheets within the workbook. Is that possible?
  19. A

    Conditional Function

    I'm using the function below to send email messages internally, and it works really well. However, I don't know the syntax to add into this which would operate like; IF Query12345 is empty THEN don't send the email ELSE send the email. How would I amend this? Public Function SendEmailAWALKE()...
  20. A

    Find and Replace on Multiple Matches

    I am working with allergen information, based on submissions from manufacturers. Believe it or not, manufacturers are sloppy and they don't do what they ought to, which is to bold, capitalise or underline allergens. So, I'd like to be able to (in layman's terms) look at the Long Text field which...
Top Bottom