Search results

  1. R

    Can I create a report a little like a cross tab query but without adding anything up?

    It is going to be difficult to create an access report, below is a basic template for using Excel as your report which could get you started ... Dim rstData As Recordset Dim strFilePath As String Dim intCount As Integer 'Used as counter Dim xl As New Excel.Application 'Opens an instance of...
  2. R

    Evaluation Notice

    Not sure what the problem is are you looking for the method of referencing your the control on your subform? If this txtdayssinceraise is in your main form I think it would be Me!Subform1.Form!ControlName So something like txtdayssinceraise =...
  3. R

    Undefined error on back-up copy

    There could be anything lurking in your db that might be referencing paths that other users might not have access to... who wrote the macros? An area I have come across that causes these type of problems are different letters mapped to the same drive paths, make sure all drive references use...
  4. R

    Can I create a report a little like a cross tab query but without adding anything up?

    Have you tried using First([Attended]) as your value ?
  5. R

    Using a date field to create folder name

    MkDir "c:\Test\Access" & Replace(Me.Date_In,"/","")
  6. R

    Append Remove History

    Possibly have a few suggestions, never sure if its best to let these things just run... Copy the db locally, create a copy of the table adding a new field [archive & User] deletekey, once created place an index on this field Run the query above ammending it to use deletekey
  7. R

    VBA to filter subform with Listbox selections

    Is your subform data source and controls bound to the query qryBirthDateQuery ?
  8. R

    VBA to filter subform with Listbox selections

    It could be you need to use the name of the subform control, not the name of the subform, though these are often the same... Forms![MainForm]![subform control name].Form.Requery or, if you are on the main form Me.[subform control name].Form.Requery
  9. R

    Excel - finding shapes

    Oops...! have you tried using something like Dim Shape As Shape For Each Shape In ActiveSheet.Shapes Shape.Select Debug.Print Shape.Name Debug.Print Shape.Left Debug.Print Shape.Top Debug.Print Shape.BottomRightCell.Address Debug.Print...
  10. R

    Insert multiple groups of Text fields in table

    Hi Its a little tricky to read but you are building a string that you are going to execute. All of the values you are adding to the string need to be evaluated before you can run it. So the line "forms!frmCMP![txtKVP_kfm_IST & Zaehler],forms!frmCMP![txtKVP_tech_IST should not...
  11. R

    Append Remove History

    use archive instead of file... ? SELECT * FROM files WHERE archive & User NOT IN ( SELECT Max(archive) & USER AS OldestFile FROM Files GROUP BY USER );
  12. R

    Append Remove History

    As a starter for 10... from the sample data , concatenating the user and filename seems to work... you will need to change the select * to DELETE once you happy with the output... SELECT * FROM files WHERE FileName & User NOT IN ( SELECT Max(FILENAME) & USER AS OldestFile FROM Files GROUP BY...
  13. R

    Dcount

    I'm not very clear are you saying, you want to use DCOUNT to accomplish the something like the following ? SELECT DEPT, Count(ID) AS Employees FROM Employee WHERE STARTDATE >=[Enter Start Date] AND ENDDATE <=[Enter End Date] GROUP BY DEPT
  14. R

    Export results from two queries to .xlsm

    That does seem likely, before you associate it to your recordset you should add the required parameters - as these are dates I think you will need to pass them in the format "mm/dd/yyyy" qdfTestData2.Parameters("[Start Date]") = "02/16/2015"
  15. R

    Export results from two queries to .xlsm

    Missing a space change "FROM to " FROM A good way to test these SQL strings is to step over the variable, capture the output in the immediate window (debug.print strSQL) and then create a new query with the output. Any syntax issues will be flagged which will assist in amending the strSQL...
  16. R

    List of mails separated with ,

    Worth reading the above article for pitfalls etc but if its a quick output then ... Dim rstMails As DAO.Recordset Dim strMails As String Set rstMails = CurrentDb.OpenRecordset("select * from [2015] order by email asc") 'order your mail With rstMails Do Until .EOF...
  17. R

    Record data when a form opens

    You are passing in 2 arguments to your procedure which is expecting 1 FlimOpen("OR IR No", "OPENED") Sub FlimOpen(ID As String)
  18. R

    Export results from two queries to .xlsm

    I believe it should read Set qdfTestData = CurrentDb.CreateQueryDef("TestData", strSQL)
  19. R

    Export results from two queries to .xlsm

    First thing that I can see is a problem with your strSQL and strSQL2 variables, there is no line continuation for the string ... You might want to start by tidying it up to something like 'pass SQL to a variable strSQL = "SELECT dbo_Patient.PatientId," & _ "...
  20. R

    vba to show if query has parameter

    Actually there is no need to parse the where clause you can do it all with the querdef object Dim qdf As DAO.QueryDef Dim intCount As Integer For Each qdf In CurrentDb.QueryDefs If qdf.Parameters.Count > 0 Then For intCount = 0 To qdf.Parameters.Count - 1...
Top Bottom