Search results

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. C

    substring extraction

    Hi Guys Does anyone know how I can retrieve the following information from a field [CONTENTS] 1 x 17.7ml 2 x 17ml 1 x 181.1ml I need 17.7 17 181.1 I was using a combination of CAST(LEFT(RIGHT...)) AS Float but that obviously won't work due to too many variations Martin
  12. C

    Creating my first stored procedure

    Hi Guys Up until now I have be through the exersize of writing an Access database then moving on to an Access front end and SQL Server back end. So I have now written all my queries as Views, well most of my queries as views. I have been advised that some of these would benefit as stored...
  13. C

    textBox refresh

    I am using a DLookup to default a value in my TextBox This text box has an event attached to it that updates a table when a different value is entered. I am having difficulty in getting the default value to reappear when I change my critera. For instance Manufacturer is Ford Colour is...
  14. C

    Refresh a textbox contents

    I have a Tab Control on a Form On this Tab Control is a Text Box [Text476] that is linked to a 1 row Table [Period] in my database. I also have on the Form but outside of the Tab Control a drop down box that allows the user to select a customer. On selecting the customer an After Update...
  15. C

    query where there is no match

    Hi guys I am looking for advice here as I am not sure how to get this scenario to work. I have a table of end of week sales with ProductID, Volume_Sold, Year and WeekNo I am about to create a historical table of RRP. What is the best way to set this out so that I can query the two tables to that...
  16. C

    count DISTINCT [field1] where [field2]=True

    I am trying to get a distinct count of [FAMILY] where [ACTIVE] = True I am using SQL server back end with pass through query to create my report. This is I guess important as DISTINCT becomes a valid operator...I think.
  17. C

    WHERE AND OR >= <= dilemma

    Hi Guys I think this has more to do with the thought process of what is going on within the WHERE clause. What I need to do is SELECT WHERE [year] >= 2013 AND [weekno] WHERE [year] = 2013 >= 38 AND [year] <= 2014 AND [weekno] WHERE [year] = 2014 <= 14 What I currently have is (which does not...
  18. C

    Entering default values

    I have a 1 row table as a result of 2 queries that give me the 'MaxYear' AS 'DefaultYear' and 'MaxWeek' AS 'DefaultWeek' in that year for a selected retailer and stores, from a master table. On my form I want the default Year and Default Week text boxes to display the values of these I have...
  19. C

    the use of FORMAT

    I have a query that when run exports itself and opens up in Excel. In the design query I set the format to Fixed,0 decimals or Fixed,2 decimals or Percent,2 decimals. Eventually this has became a pass through query as my data is stored on SQL Server. I'm not sure if its a result of the...
  20. C

    sum if

    I am trying to find the sum of items sold in the last two weeks something along the lines if this: If week number is greater than the maximum weeknumber then sum the Volumns of the last two weeks. Ive tried this: IIF([CM-DATA].[WeekNo] >= Max[CM_DATA].[WeekNo]-2,SUM([CM_DATA].[Volume]))...
Top Bottom