Search results

  1. W

    Date query - how do I find the last April?

    Hi, I have several queries based around the financial year so they mostly begin in April (01/04). The following code will count all rows in April of the current year, but if I run it in January it obviously returns zero. Count(IIf([RTB1] Between "01/04/" & Year(Date()) And "30/04/" &...
  2. W

    Using query to populate email body

    Hi, I'm using the code below to create an email and then populate it with the results of the query - this works fine. Note the WHERE part of the query - we'll be revisiting it soon.... Private Sub CmdEmail_Click() Dim olApp As Object Dim olItem As Variant Dim olatt As String...
  3. W

    OPening Word doc from button

    Hi all, I want a word doc to open when I click a button - simple. The problem is that I have to click the button twice to get the doc to open. How do I get it to work on a single click? Many thanks Here's my code: Private Sub cmdInstruct_Click() Dim appWord As Word.Application Dim doc...
  4. W

    Error 424 when opening .xlsx from Access 2010

    Hi, when opening an excel spreadsheet from a link on a form the spreadsheet opens in a minimised state. Adding this line of code fixes the problem and opens the spreadsheet with focus. Set xlApp.UserControl = True However, when I close the spreadsheet there's an error message behind it - 424 -...
  5. W

    removing a digit from string

    Hi, I have a field called PropertyID which stores a unique 13 digit number, the 10th digit is always a 3. I want to remove the 3 to leave a 12 digit number. I've tried running an Update query using Replace([PropertyID],"3","",10,1) but no joy, what am I doing wrong? Thanks in advance
Back
Top Bottom