Search results

  1. C

    Export with Formatting

    Hi cyanidem Trouble is JobRefNo is created at runtime so I can't create a query to include it then. My form - frmtelesales is interactive and used to select the records I want to see and is based on a single unbound box that runs through all my fields to get a list. i.e. I could type in...
  2. C

    Export with Formatting

    Hi and apologies if this is not in the correct area. I have the following built in access macro ExportWithFormatting Object Type Form Object Name My List Output Format Excel Workbook (*.xlsx) Output File Auto Start Yes Template File Encoding Output...
  3. C

    opening a word document from Access

    Well how does this work... It works perfectly for my needs 3 days of trial and its 1 line of code Application.FollowHyperlink "D:\MyPath\AnyWordDoc.doc" http://www.access-programmers.co.uk/forums/showthread.php?t=185914
  4. C

    opening a word document from Access

    OK So I added in the Microsoft Word 14.0bject Library Saved and closed and reopened my database but I still get the same problem No merged documents.. :confused:
  5. C

    opening a word document from Access

    Hi I have a word document that has been set up to pull in a mail merge from Access 2010, this has worked fine for a couple of months now. I now need to get Access to open the word document for me, But all my attempts all fail. When the word doc opens this way it does not include the SQL...
  6. C

    Append query fails on validation rule violations

    Well that appeared to work...can you shed any light on why!!
  7. C

    Append query fails on validation rule violations

    Hi Anyone have any idea why I get this message: I am running an Append query which basically looks for records in my OPPORTUNITY table where the EVENT DATE is this month and the STATUS = invoice and INVOICED is False What I want to do is to copy these to my INVOICES table ready for a mail...
  8. C

    Append record if exist or Update if not exist

    Eh..How does that work I just get an error.. UPDATE <Destination table> A INNER JOIN <Source table> B ON A.aaa = B.aaa AND A.bbb = B.bbb AND A.ccc = B.ccc AND A.ddd = B.ddd SET A.aaa = B.aaa AND A.bbb = B.bbb AND A.ccc = B.ccc AND A.ddd = B.ddd This works as an INNER JOIN but if I Just change...
  9. C

    pass-through query to make pivotchart/table problem

    I have been advised that Pass-through stored procedures return read only results. This is why I cannot pivot within Access - really! So I have to put my SP code into a query in order to pivot it into a chart and risk SQL injection. Hmm can this really be right.
  10. C

    pass-through query to make pivotchart/table problem

    Hi I have some code that I need to produce a pivot chart from. This works fine when I have the entire code as a pass through query but as soon as I call the same code as a stored procedure from within SQL server the pivot drop zones become grey out and unusable. Has anyone any ideas why this...
  11. C

    Passthrough SQL in VBA

    I am attempting to pass a SQL statement from Access to SQL Server The tables are SQL temporary tables and this query should drop then build the table [TopStores] The code appears to run as there are not any errors displayed, however the table is not created The temporary tables which this is...
  12. C

    text box to show time taken

    Whoa! That is an exemplary answer. It goes way beyond what I was asking for but I very much appreciate your time and effort and will certainly look at this. I could then use it in all my reports (even if just for laughs) Martin
  13. C

    text box to show time taken

    Thanks both of you, I just needed the extra missing steps
  14. C

    text box to show time taken

    Hi guys I have some vba that ends with a text box being displayed that says "file created" I would like to add to that text box how long it took. My initial thoughts are to add to the start of the code a variable that stores the current time (stTime) and at the line before the...
  15. C

    Simulate Parameters in an SQL Pass-Through Query

    Hi ya That is the whole thing I need to amend it (in access) to pick up a user entered variable/parameter from somewhere (possibly a text box) so that it reads Select Top (@Parm) ....... Martin
  16. C

    Simulate Parameters in an SQL Pass-Through Query

    I have an Access pass-through query that selects the top 10. I need to be able to allow a user to select the top x How do I pass x as a parameter to SQL Server by embedding it into my Pass-through query. this is my code SELECT TOP 10 Country ,Retailer ,[Store...
  17. C

    Batch print to PDF

    Sorry, I know similar things have been requested in the past http://www.access-programmers.co.uk/forums/showthread.php?t=245039 I have 20+ reports that need to be output to a single PDF file daily This is not 1 report with 20 Invoices type of thing that can be run in a loop. I just...
  18. C

    mirror contents of listbox in a textbox

    There are probably better ways of doing this but heres mine and it needs help... I have a drop down box where I select a Retailer When this choise is made I want the last invoice entry to appear in a text box. I have attepted this by creating a query which contains the top 1 invoice in...
  19. C

    Adapt a transform query to T-SQL view

    Hi Guys how can I accomplish the following: The below query has been written in Access, I would like to convert that into Sql Server Management Studio 2012 TRANSFORM IIf(Sum([Volume])>0,'X',"") AS Expr1 SELECT CM_DATA.YearWeek FROM CM_DATA GROUP BY CM_DATA.YearWeek ORDER BY CM_DATA.YearWeek...
  20. C

    substring extraction

    OK I think I cracked it If anyone has a better way let me know RTRIM(CAST(cast(round(sum(CAST(REPLACE(CAST(SUBSTRING([CONTENTS],PATINDEX('%'+'x'+'%',[CONTENTS])+2,PATINDEX('%'+'ml'+'%',[CONTENTS])-5)AS numeric),'ml','') AS numeric))/1000,0)as numeric(15,0))AS CHAR))+' Ltrs' AS K
Back
Top Bottom