Sorting Of Query In Subform Doesn't Happen
Nov 6, 2006
Hi,
I have a query for a subform which is displayed in datasheet mode (see attachment). I've created a form based on a query and used it as a subform.
The "casenumbers" per clients are displayed from 1 and upwards, I would like to have them sorted Descending. So in the query I sorted them that way. When I run the query they are displayed in descending order. When I open the subform based on that query however it is not. I can sort descending anyway by clicking the column on which I want to sort and do it that way, but that becomes bothersome and it doesn't need to be that way.
Record source is ok:
SELECT KlantNAW.ClientNumber, CaseInfoTable.Casenumber, CaseInfoTable.DateInitialCall, CaseInfoTable.DateCaseCreation, CaseInfoTable.CaseAccepted, CaseInfoTable.[1stAppointmentDate], CaseInfoTable.DateCaseClosed, CaseInfoTable.About1 FROM KlantNAW INNER JOIN CaseInfoTable ON KlantNAW.ClientNumber=CaseInfoTable.ClientNumber;
Order by:
Casenumber DESC
I thought, well, lets create a new form based on the query to see if that changes anything, maybe I've changed something I shouldn't have.
But nope, same result.
How can make the form sort descending in datasheet mode?
View Replies
ADVERTISEMENT
Aug 22, 2013
I already success to run this dynamic query where the parameters taken from the main form.Now the problem is the query result doesn't show in the subform.But the status bar below tell me that it have 2 records in the subform, but there is no data in the subform, it just Blank.I already apllied the Requery or Refresh to the subform (in the Command Button), but it have no result too.This is the code:
Forms!MsDataWarga.QueryDataWarga.Form.RecordSource = "MyQuery"
Forms!MsDataWarga.QueryDataWarga.Requery
Forms!MsDataWarga.QueryDataWarga.Refresh
View 4 Replies
View Related
Dec 18, 2006
why would this occur???
this is my query:
strSQL = "INSERT INTO tblRunItems ( SiteId, RunID )SELECT tblSites.SiteId, " & Me.RunId & " FROM tblSites, tblRuns WHERE tblSites.CollectionZone = '" & Me.RunZone & "' AND tblSites.CollectionDay = '" & Me.RunDay & "'"
This results in the same records being entered 4 times into tblRunItems
Cant for the life of me figure out why
View 5 Replies
View Related
May 25, 2005
I just wondered if there was a way in vb that I could make an event occur every 30 seconds, such as a requery, or refresh
Thaqnks
View 1 Replies
View Related
Nov 18, 2005
I need to order a sub form (which is a continuous form) by a Date field in decending order (so that the latest date appears at the top).
When I open the subform on its own the sort works fine by just sorting using the OrderBy property but when it is opened as a subform it doesn’t sort in the same way.
help
View 1 Replies
View Related
Feb 8, 2006
Hi All... please read on and see if you can help
GOAL: To sort my subform data in descending order;
I have a subform off a large query... the query has other forms off it...
so on the subform I have used the Order By property...
qryDeliveries.EntDate DESC
:) sure enough when the subform is opened the continuous data is sorted in descending order by date....
:( BUT.. When I add this subform to my unbound main form it doesn't sort the subforms data? I didn't want to sort on the query because it runs other forms???
Please advise
Simon
View 2 Replies
View Related
Sep 24, 2006
I have a form that lists contact information for people, and also has a subform that shows their participation in different events that my group puts on.
The subform, when viewed by itself, sorts the data based on one of the combo boxes just fine, since I have the subform based on a query that is sorted correctly.
But when I view the main form, which includes the subform on it, the data on the subform is not sorting at all.
Any idea why it would sort properly when viewed directly, but not when viewed as part of the main form?
View 1 Replies
View Related
Oct 29, 2006
I have subform which displays correctly off a table but is there a way besides making it off a query to filter just one criteria? Such as Y instead of N? Or do I have to go through it and use a query for the source? Which is the best?
The box im using is Y/N
View 2 Replies
View Related
Aug 18, 2004
Only just started happening, with no explaination! Only one subform out of 5 shows as just background space until a choice is made from a combo box and then the thing appears with the record. WHY?!?!?! I HATE ACCESS... It's rubbish!! Apologies for my outburst...
View 1 Replies
View Related
Nov 23, 2006
Hi All hope some one can help with this.
I have a sub for which is set to sort by ascending order for a given field which happens to be a text field with vales set something like abc1.1,abc1.2 ect. The problem is, is that when you get to abc1.10, and more these are then sorted as so
abc1.1
abc1.10
abc1.11
abc1.2
abc1.3
ect
How can I stop this and sort it:
abc1.1
abc1.2
abc1.3
.......
abc1.10
abc1.11
Thanks for any help with this
Paul
View 2 Replies
View Related
Aug 2, 2007
I have an application that has two tables, linked on a common key. The main data entry form is for invoices, and has a sub-form for parts used. A similar report/sub-report is used for reporting. Everything is fine for records that are entered via the form. My problem is that when I import data from other sources ( consolidation process ) the calculations are not performed. So when those records are displayed no totals appear until I click on a control that drives the calculations. I don't want to store totals in the database but I need to have them reflected on the viewed form without operator intervention. Otherwise I'm open to incorrect decisions when the operator doesn't notice that an invoice doesn't reflect the cost of parts used.I'm looking for a "one-time" process that I can invoke after loading new data that would "touch" each record (ideally each "new" record but there's no impact to re-calculating existing ones) and drive the calculations so that the viewed form is correct.It doesn't need to be "easy" or automated since the end users won't do it, only myself as part of the data consolidation.Any ideas?Thanks
View 14 Replies
View Related
May 28, 2013
I have a report with 2 subforms. The Main report is Client info. Sub1 has ContactNotes for each client. It is in the detail section of Main, is in continuous mode, and is related to Main thru key ClientID. This prints good. Sub2 is a signature block for the report. It is unrelated. It looks at the "Initials" field in ContactNotes, uses the date range and ClientID that Sub1 uses, and develops a list of the Clinicians that had contact with the client. their names and cert's are in a list form with a line for their signatures. This is working correctly and shows in print preview but will not print. I have put it in the reportfooter on Main, in the reportfooter of Sub1, it calculates properly and shows in print preview but will not print!!!
View 3 Replies
View Related
Jan 7, 2015
How to sort entered records in a subform by combo box. Notice combo box has integer value not text. I want to bo sroted by text visibled ASC. The code must be in Command control SORT (See pict enclosed)
View 2 Replies
View Related
Feb 21, 2014
I have a subform which tracks all the notes our personnel have entered in a specific project (which is the main form).
The issue is that I want the most current note to show in the subform when the project is "opened up". The underlying query for the subform has the [DATE] field sorted on "Descending".
View 2 Replies
View Related
Feb 27, 2015
I'm running into an issue with my forms. I have a form that contains a subform, that contains a list of projects. This list is read-only. To update a record, you can double click on it, which opens another form filtered on this record, and which contains the fields in the first form as well as some others.
I have a command button on that last form to "Save and close", which fires up a macro that saves the record and closes the window.
Now, the issue that I'm having is that, when the window closes and I'm once again in front of the first form with the list of projects, the values of the record I changed are not updated and when I click on another record, Access tells me there's a conflict in the values and asks me if I want to keep the changes, discard them or copy to the clipboard.
It seems to consider the old values from the first form as a change, and thus asks me which to keep between these, and the actual (proper) changes I made in the dedicated form.
For the proper changes to be applied, I need to select "Drop changes".
I tried to requery the first form, also undo the changes to it after closing the window, but none of that worked.
I'm actually basing this on one of the templates, which does exactly what I want and which obviously works...
View 3 Replies
View Related
Feb 10, 2015
I'm trying to use the following code to programmatically sort four fields on the continous subform:
Code:
Me.SPlanChange_03_OFFSET.Form.OrderBy = "AOBJ ASC, ORG ASC, AVAILABLE DESC, AGFND ASC"
Me.SPlanChange_03_OFFSET.Form.OrderByOn = True
It appears that the code works partially - the values in the "AOBJ" field are as they be and so are the values in "AVAILABLE" field. The values in the "ORG" and "AGFND" fields will not sort.
Is what I'm trying to do even possible?
View 1 Replies
View Related
Jun 13, 2005
Hello,
I have a form and a subform in MS Access 2003. I have made some changes to database structure, so I decided to change the subform also. When I changed the Link child and link master fields, the controls of the subdatasheet dissapear- they show only in design view. If I clear the contents of Link child and link master fields they appear again, but the records are not binded.
Is there a setting on the parent form that also has to be changed, to make the new binding?
Thanks,
Aleksander
View 1 Replies
View Related
Mar 10, 2006
Hi all.
I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number.
I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.
Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..
I'd apreciate some help with this :) Thanks
Here's the database (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=12934&stc=1&d=1142018915&PHPSESSID=f730b7f11f6983965698faeacbe5a1ee)
View 5 Replies
View Related
Aug 12, 2015
I have a query where these are the fields:
ProductRevType
RevLag
RevFlowThru
CloseMoYr
ProjRevDate
CurrentMRC
ProjRevMRC
The ProjRevMRC field is an expression that reads:ProjRevMRC: IIf([ProjRevDate]>=DateSerial(Year(Date()),Month(Date()),1),[CurrentMRC]*[qry303a_ SFADetailMRC_ONLY]![Rev Flow Through],0)
When I run the query, it works perfectly, but when I created a crosstab query to show totals by month, I wanted the totals to be zero for the months less than the current month. Is there a way for the crosstab query to execute the expression and put zeroes for those months?
View 4 Replies
View Related
Jul 17, 2013
The error is:
The LinkMasterFields property setting has produced this error: 'The object doesn't contain the Automation object 'tblIndividual.' '
Then it also gives me the same one on another table.
I think it has something to do with the link master/child fields. I've tried all kinds of relationships with the three tables and can't figure it out.
I've tried uploading the database here but it won't. It's on my Sky Drive.
[URL] .....
View 5 Replies
View Related
Nov 28, 2004
Hi,
I have a report that have a datebox(Short date) and a timebox(Short time) and also a box that contains numbers like 36:59 and so on. That number is hours and minutes, I would like to take the date, time and add my 36:59 and get a new date from that and put that in another box. The date and time is used as planned date and planned time for some work to happen. 36:59+planned time+planned date=should be planned finishing date and time. Does anyone know what I have to do, to make this happen ???
View 2 Replies
View Related
Jan 15, 2007
I want to execute a delete query on a table of account records. The query contains two tables linked on account number, one with a list of unique records, linked to the other with "many" records to be deleted. For each unique record from table A, I want the delete query to delete all records with a matching account number in table B. However, I get a message stating that I "could not delete from the specified table." Huh???
I can manually delete from table B, or I can get the query to work if I don't try using table A as the control table and instead specify literal criteria. I have tried all three join types but still no luck. Any ideas?
Many thanks in advance for any help provided-
SLH
View 2 Replies
View Related
Apr 27, 2007
Hello,
I have an access query that I run on a regular basis but that doesn't always sort. It sorts most of the time, but once in a while it won't, which makes it really annoying and impractical.
Does anybody know why this is happening?
Thank you.
The query is:
SELECT P.GEOSORT, P.TERR_CODE_IND AS TERR_CODE, P.GEO_CODE, P.GEO_DESC, P.PRODUCT_SHORT_NAME, P.M23VA, P.M22VA, P.M21VA, P.M20VA, P.M19VA, P.M18VA, P.M17VA, P.M16VA, P.M15VA, P.M14VA, P.M13VA, P.M12VA, P.M11VA, P.M10VA, P.M9VA, P.M8VA, P.M7VA, P.M6VA, P.M5VA, P.M4VA, P.M3VA, P.M2VA, P.M1VA, P.CMTHVA, P.M23VC, P.M22VC, P.M21VC, P.M20VC, P.M19VC, P.M18VC, P.M17VC, P.M16VC, P.M15VC, P.M14VC, P.M13VC, P.M12VC, P.M11VC, P.M10VC, P.M9VC, P.M8VC, P.M7VC, P.M6VC, P.M5VC, P.M4VC, P.M3VC, P.M2VC, P.M1VC, P.CMTHVC, P.M23VSAA, P.M22VSAA, P.M21VSAA, P.M20VSAA, P.M19VSAA, P.M18VSAA, P.M17VSAA, P.M16VSAA, P.M15VSAA, P.M14VSAA, P.M13VSAA, P.M12VSAA, P.M11VSAA, P.M10VSAA, P.M9VSAA, P.M8VSAA, P.M7VSAA, P.M6VSAA, P.M5VSAA, P.M4VSAA, P.M3VSAA, P.M2VSAA, P.M1VSAA, P.CMTHVSAA, P.M23VSAC, P.M22VSAC, P.M21VSAC, P.M20VSAC, P.M19VSAC, P.M18VSAC, P.M17VSAC, P.M16VSAC, P.M15VSAC, P.M14VSAC, P.M13VSAC, P.M12VSAC, P.M11VSAC, P.M10VSAC, P.M9VSAC, P.M8VSAC, P.M7VSAC, P.M6VSAC, P.M5VSAC, P.M4VSAC, P.M3VSAC, P.M2VSAC, P.M1VSAC, P.CMTHVSAC INTO SORTED_P
FROM P
ORDER BY P.GEOSORT, P.TERR_CODE_IND, P.GEO_CODE, P.GEO_DESC, P.PRODUCT_LOGICAL_ORDER;
View 6 Replies
View Related
Mar 28, 2006
Hi,
My question is:
I have a subform which is located in a Tab control within a main form.
The subform is horizontal and exceeds the page width.
When inserting data the Tab key doesn't result in auto scrolling of the page to the right (as opposed to using Tab in a regular form).
This means that I have to use the horizontal scroll bar all the time. How can I fix this?
Any suggestions would be appriciated
View 2 Replies
View Related
Sep 27, 2005
If I copy paste the SQL from a query (View->SQL) to a macro it doesn't work.
Why?
I've tried removing quotes,Caps, adding quotes, parenthesis nothing worked.
Any ideas?
View 3 Replies
View Related
Mar 7, 2007
I created a database that contains 2 tables. I then created a query that simply groups the data and calculates a row total. And it works as expected. However, when I try to create a report, using the query, I get, "The wizard was unable to generate fields from the record source you chose. Perhaps you chose a query that doesn't return any fields."
What am I doing wrong?
Screencaps attached.
Thanks.
View 9 Replies
View Related