Search results

  1. S

    Previous Row

    Hi I need to get the closing stock from the previous day for the same department. See below example. So for department 111 I need the closing stock for the previous due date. This then becomes the opening stock for that day, hope that makes sense At the moment I have manually done it, but I...
  2. S

    Summing next 10 days

    How can I get Access to get an average of the next 10 days orders. See example picture. So todays date is the 20-Mar as highlighted in orange. I need to get the average of the next 10 days orders (21st to 30th March), the ones highlighted in Green. To give me the figure in Blue. But I also need...
  3. S

    Split by Commas and add to new table

    This question has been asked before so apologies for duplication, mine is slightly different though. I have a table with a few columns in, one column has codes in it, split by commas. I need to split this column into separate rows, with the rest of the data. Example below, just a few columns...
  4. S

    Latest Date Query

    How can I get the latest date and the relevant columns in an access query. My Data is in a similar format to this. Number Supplier Country ExpiryDate A B C D E F G 4049929726987 W RSA SA 19-Jul-19 No No No No No No No 4049929726987 W RSA SA 19-Mar-19 Yes Yes Yes Yes Yes No Yes 4049929726987 W...
  5. S

    Excel running Access VBA

    I have the following code in Excel VBA. The OpenQuery part of the code is working but the Transfer Spreadsheet part isn't giving warning runtime error 3170 Could not find installable ISAM Any ideas? Set A = CreateObject("Access.Application") A.Visible = False A.OpenCurrentDatabase...
  6. S

    Circular Reference

    I have data in a table in Access. I need to show this data in a summary document but keep getting a circular reference. Is there a way I can do this, using just one query, without creating a circular reference? See example in Excel. My data in the the Main Info Tab. I have Weeks, Qty, and an...
  7. S

    Opening/Closing Stocks

    Hi Not sure if this has been asked before, wouldn't know how to begin looking for it to be honest as I am going to find it hard to describe. Basically we have stocks of an item and we monitor stocks coming in and orders going out week on week. We have an opening stock, we then add on...
  8. S

    Set Focus based on user entry

    Apologies if this has been asked before, but I couldn't find anything. I have a form with quite a few fields on it. What I want to do is have a ComboBox which holds a list of all the field names. I want the user to be able to pick a field from the list and the form sets focus to the field they...
  9. S

    adding hyperlink to a picture

    I have an access database which exports data out to an excel file. it then formats the excel file and adds in pictures. What I want to do now is add a hyperlink to the picture. I have recorded a macro in excel of me doing this and I am trying to copy it into access but I am getting a message...
  10. S

    Save down Query Results

    I have a form in an access database. On this form are options for the user to select so thay can run there own queries. What i now want to do is give the user an option to save the results down. Quite easy if they are being saved in the same place. i.e. C:/Temp, as every user has this file on...
  11. S

    Macro AutoRun

    I have a macro that runs when a value is changed in a cell. But it moves me to Cell A1 once run and I have to click back to where I was, i.e. line 200. Is there a way to get the macro to run but then to take me back to the cell I was in? Code at the moment is just Private Sub...
  12. S

    Dlookup doesn't go beyond first row

    I have a D Lookup, which works, if what I am looking up is in the first row, for some reason it won't go beyond. Can anyone help. My code is If 5 = DLookup("TabNo", "Running", 5) Then DoCmd.RunMacro "Macro1" Else DoCmd.RunMacro "Start Table Macro" End If No it will look up 5 if 5 is in...
  13. S

    DLookup Problem

    Hi Have this code Private Sub Command2_Click() If Me.Text0.Value = DLookup("TableNumber", "RunningTables", _ "[TableNumberID]=" & Me.Text01.Value) Then Me.Text1.Value = "yes" Else Me.Text1.Value = "no" End If End Sub But I keep getting Runtime error 2001 you cancelled the previous...
  14. S

    Convert Time Elapsed into Minutes

    I have a table with a start time in it. I have a query that relates to the table. In my query I have a duration field Duration: Format(Now()-[Start Time],"hh:mm:ss") this gives me the length of time thats elapsed from the start time to now. I now need to convert that into Minutes elapsed. I...
  15. S

    paste special

    I have the following code which isn't working, can someone help? xlApp.Range("D14").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Basically I am formatting an excel spreadsheet from Access then resaving as a different name.
  16. S

    Query Query

    I have an access database. It has 2 tables, One with a list of peoples names and one with a list of orders. I have one query. I want to be able to run this query for each person in the first table and export the data as that persons name. THen move onto the next, and so on Is there a way I can...
  17. S

    VBA code won't delete sheet

    I have some code to open an excel workbook in the background, run the macro in that workbook, delete a worksheet, then save as. It all works perfect apart from the delete worksheet part. Can anyone help? This is my code: Public Sub RunExcelMacroOrSub() 'declare variables Dim xlApp As...
  18. S

    Delete Macro from Excel Workbook

    Hi I have some vba in access that exports data to an excel workbook, runs the macro in that workbook, then does a save as. Thing is it also saves the macro when it does the save as. Is there a way I can delete the macro after the save as? Hope that makes sense. Many Thanks Simon
  19. S

    Conditional Formatting in VBA

    I have this code which isn't working. Could someone give me some pointers? .Application.Cells.Select .Application.Selection.FormatConditions.Delete .Application.Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, Formula1:="549"...
  20. S

    formatting an excel document in access

    I have read up and found that you can format an excel document from access. I have not seen though if it is possible to get access to add in comment boxes into certain cells in excel, is this possible? Thanks
Back
Top Bottom