Include is code in the Command button's on click:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "NewFormNameHere"
stLinkCriteria = "[JobID]=" & Me![JobID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
JobID should be replaced with...
I am running Access 2000. The problem form is for tracking Hours. I have a main form that hold employees names and a continuous subform is fed off of those names. The subform holds the date and hours and operation, so one day could have multiple entries. I have some a Text box on the bottom...
Sorry I want both All and Last Week. So in crosstab I can't have two. I am building two crosstab queries then combining them with a select query.
I am having problems with the Cross tab left join, it won't show all records (OperationID's) from my operation table, only those with numbers in...
I am using Access 2000.
I have a crosstab query built on jobid as row, summary actual hours as value and operationID as column. I would like to have essentially the same thing in the same query, but limit the acutal hours dates. It won't let me have more than one value per crosstab query. Do...
I figured it out and you set me in the right direction. I needed to use a subquery in my index field.
HAVING (((tblRemainingHours.RemainingHoursID) In (SELECT Max(tblRemainingHours.[RemainingHoursID]) AS [MaxOfRemainingHoursID] FROM tblRemainingHours GROUP BY tblRemainingHours.[JobID];))...
The TOP Statement gives me the most recent one record of the query, where I want the top value for each JobID not just the most recent one. I can't believe I can't figure this out.
Thanks.
Maybe I misunderstood how to do this John, but I am still getting all the records on the many side (in tblRemainingHours for each JobID). I have = Max([RemainingHoursID]) in the RemainingHoursID, or SQL: HAVING (((tblRemainingHours.RemainingHoursID)=Max([RemainingHoursID]))
if I instead use...
I do have an index key, I think...the Primary key for tblRemainingHours? I'll try that, but how does one sort by DEC? Ascending? Then how would I get the last record.
I'll try the max of my index. Many thanks.
Nishan
Thanks all who read and answer my and everyone elses questions.
I am not quite sure how to go about this. I have a main table: tblJobs and JobID relates to many records in tblRemainingHours. I want to get the most recent remaining hours date (RmgDate) record in my query.
I have tried using...
Hello and thank you for looking at my problem.
I get an error stating that "number of query values and detinations are not the same.
Can anyone tell me what is wrong with the following code in Access 2000 written in VBA:
Dim stSQL As String
DoCmd.SetWarnings False
stSQL = "INSERT...
I am not exactly sure how to go about this problem in Access 2000.
I have a form built on employee records, and a subform with hours, operation etc.
The operations are in a combobox fed from another table. I was wondering how I limit the operations combobox depending on the employee? Ie. Joe...
Yes it is set to compact and repair.
It was a replica.
And I solved it by again creating a new DB linking the tables and then importing everything that wasn't corrupt. Interestingly, the first two times I tried this I tried to import everything from a replica. Somehow this made Access...
Well I hope someone else has had this issue, though I really wish it on no one.
I am using Access 2000 and have built a pretty sizable DB that is split, with four different FEs on personal networked boxes and the BE on the Server. This has worked beautifully for quite some time as I have made...
Ya,
I think I'll have to do each weekday, then sum it.
I think that the "[HoursDate]">[MaxDate]-Weekday([MaxDate],2), works better because I don't want five previous days, I want Monday on to MaxDate.
OK, so to get that most recent monday:
[MaxDate]-Weekday([MaxDate],2)
This works correctly, but when I put it in the dsum fuction as such:
=DSum("[HoursDetail]","qryHoursDetail","[HoursDate]" >[MaxDate]-Weekday([MaxDate],2))
it returns nothing. Any suggestions?
I don't think I understand your question. Wouldn't your subform query be for just that record on your main form, thus allowing you to enter anything you wanted for that mainform record. Or maybe I don't understand your question.
Nishan
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.