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...
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 =...
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...
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
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
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...
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...
use archive instead of file... ?
SELECT *
FROM files
WHERE
archive & User NOT IN
(
SELECT Max(archive) & USER AS OldestFile
FROM Files
GROUP BY USER
);
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...
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
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"
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...
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...
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," & _
"...
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...