Try something like:
SELECT Format(Max([Time])-Min([Time]),"hh:nn") AS Elapsed, Format([Time],"dd-mm-yyyy") AS Day, YourTable.StaffMmember
FROM YourTable
GROUP BY Format([Time],"dd-mm-yyyy"), YourTable.StaffMmember;
This must return the elapsed time between the first and the last hour of...
This is not a criteria, you must show the totals row (menu View ->Totals), under your field will appear Group By , then select Max as Total (you also can select min, averange, count, etc)
Greetings from Chile
flugh:
Like I say previously the logic of the sentence is not the problem. I put the generated sentence manually in the query and It works exactly as I want, the problem is to make this through a parameter(The sentence is generated automatically)
OhioSteve
Thanks for the tip, but probably my bad english cause I can express my problem appropriately:
The criteria is a combination of values of one field of one table(And - Or combination) and not only a fixed value. In code:
'StrQuery is a Public Variable
StrQuery="[Table].Field1...
The idea is select only the recors where Field1 is diferent of a serie of values: i.e.
Field1 Field2
------------------------------
a ! 1
b ! 2
a ! 3
d ! 4
h ! 10
1) Select only the fields <>"a"...
I have a string with the criteria in a select query (source of another) something like "[Table].Field1 <> 'X' and [Table].Field2 <> 'XX'".
I'm not able to make the query through code, 'cos It's a part of a second query, and that part of another... I try to make a function who pass the...
You can make a table (PassTbl) with only a field (Ctrl), type Yes/No, now create only one record with value yes.
Create a query an set relationship between the Complete field and Ctrl field of PassTbl. That must show you only the record with Complete=True
Greetings from Chile
Try putting this in the on change event procedure of your text box:
Me![MyCheck] = (Len(MyText.Text) > 0)
Where MyCheck is your Checkbox Name an MyText is the textbox you want to link.
Andyukcy:
The open argument field is a string, you can pass the value to the second form join the three fields in one.
The second option is declaring three Public Variable and set the value you want in that before open the new form.
I suggest modify your form and replace the check boxes for Option Button(even you can make that look like checkbox)
The easiest way is make a new frame with the wizard enable, then enter the values Monday..Sunday an select the aspect. Also you don't need to validate if the user has selected...
This code will make the replacement:
[code]
Sub ReplaceField()
Dim dbs As Database
Dim rst As Recordset
Dim Po_Previo As Integer
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT * FROM [Table]")
With rst
.MoveLast
.MoveFirst...
Two explanations can be the cause of the problem:
1) The field we are looking for is text type. If that's the case modify the sentence as:
AuxVar = DLookup("[CitationID]", "tblTrafficCitation", "[MemberID] = '" & MemberID & "'")
2) There are not...
I use still Access 97, but I use a different trick for this:
I declare a Public variable for Criteria, after that I create a Public function returning the value of the global variable. In after update event procedure of the control I change the value of the variable to match the control. This...
Hi
You forgot to say what field link two tables. I suppose MemberID in the tblMain with Member in tblTrafficCitation, otherwise change the red field in the code.
Forget all the previous code I gave to you and in On Current event procedure of frmMain write:
Private Sub Form_Current()
Dim...
First create a Query for the total of each subordinated(based on the table wich contens the subform records):
- Add a unique field for each employee (i.e. Social Security Number or EmployeeID), set the Criteria to FilterEmployee()
- Add the value field :
EmployeeTotal...
That's mean "Select all fields of Products table order by ProductName"(also all records). The reason why you can't see your data is not the SQL sentence(unless the table Products is empty), the reason is the property Column Width, this say to access what field show(width of each column...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.