Recent content by Scotbot

  1. S

    Insert query results into Me.Filter string

    Thanks for your help. In the end I created a query and set it as the record source for the form, and then used a QueryDef to re-write the SQL and a form refresh to load the filtered values. I found that the looping was taking quite a while to execute. Cheers, Scott.
  2. S

    Insert query results into Me.Filter string

    Thanks, I did read your link however I didn't understand it as I'm very new to VBA. I'll give your code a try - thanks for your time. It's possible that like many newcomers to VBA I'm not yet at the level where I can fully interpret code and know what to adjust.
  3. S

    Insert query results into Me.Filter string

    Thanks for your help. I've got stuck on the syntax I think, I'm not sure how to place the query results into the filter string. I've tried: Me.Filter = "ActivityOutlet = DoCmd.OpenQuery(FilterCalls)" DoCmd.RunCommand acCmdApplyFilterSort Which returns an error stating there is an undefined...
  4. S

    Insert query results into Me.Filter string

    Hi, I have a query which returns values from a column in my table and a split form which shows the table. I have a command button which I want to use to filter the records. I know how to use VBA filter strings for example this one which filters according to a combo box value: Me.Filter =...
  5. S

    How do I add a paramater to a passthrough query that executes a stored procedure?

    Re: How do I add a parameter to a passthrough query that executes a stored procedure? Hi, The stored procedure doesn't return any results to Access, it runs a series of insert and update queries on the MSSQL server. So Access doesn't need to handle any results from the SP, it just needs to...
  6. S

    How do I add a paramater to a passthrough query that executes a stored procedure?

    Hi, I'm still stuck on this after revisiting it today. I belive I can use a line of VBA code that is triggered by clicking a button on a form, and the two dates that I need to pass to the stored procedure are from date text boxes on the same form. The code that I found and have edited to...
  7. S

    How do I add a paramater to a passthrough query that executes a stored procedure?

    Thanks, I've had a look at QueryDef but I can't figure out how to pass its results to another query without writing to a table first - is that neccessary?
  8. S

    text field in query

    Would you be able to add a field to each of the source csv files with a reference, that will be read into Access and tell you which file it came from?
  9. S

    How do I add a paramater to a passthrough query that executes a stored procedure?

    Hi, I'm using a pass-through query in Access to trigger a stored procedure which is on my MSSQL server: USE Raptor DECLARE @return_value int DECLARE @ActivityNumber int EXEC dbo.SWACCESSResults @ActivityNumber = '140040024' As this runs on the SQL server (because it's a pass -through...
  10. S

    Pass through Query - prompt for parameter?

    Hi, I have this pass through query: USE Raptor DECLARE @return_value int DECLARE @ActivityNumber int EXEC dbo.SWANSTAResults @ActivityNumber = '140040014'Which works fine. I would like it to prompt for the value of @ActivityNumber but I'm not sure how to achieve this - is there any way to...
  11. S

    PivotChart - Only 'count' available in Autocalc menu

    Hi, I have a simple query that returns retailer name, month, and a value figure. I have plotted retailer name as series, month as X axis, and the value figure as data. There are multiple entries with the same retailer name and month because there are lots of branches. The only aggregate...
  12. S

    #type error, and parameter not recognised

    Hi, I have a report as shown in 1.jpg. First issue: I'm trying to add a field on the 'Activity Code Header' line which calculates the SUM of the field 'Taxable' which is on the 'PMI Code Header' line. I've used the formula =SUM([Taxable]) and this doesn't show an error in design view but asks...
  13. S

    Returning a two digit week number using format or datepart

    Thanks very much, I didn't realise we could use format in that way. Cheers!
  14. S

    Returning a two digit week number using format or datepart

    Hi, I have a query which extracts the year and the week number from a date and appends another numeric field on the end so that for example 01/12/2010 1234 becomes Y10-W50-1234 (I may not have got the week number correct but you get the idea) WeekBranch: "Y" &...
  15. S

    Subquery to select value based on calculated date

    Apologies, I'm so used to all my databases showing all Access objects that I didn't even know you could filter the navigation pane! Based on your demo I've been able to create a weeklay sales uplift matrix for a 2 year period, thanks for your help - much appreciated!
Back
Top Bottom