General :: Comment History Field To Appear On A Form - Change Sort Order Of Results
Aug 28, 2013
I have after much stress gotten my comments history field to appear on a form.
The following code gives me what I needed
Code:
=ColumnHistory([RecordSource],"LastUpdateBy","[ID]=" & Nz([ID],0))
I have only one simple thing left, that is perplexing to say the least.
Some comment fields will be many short notes, spread over time.
My desire is to change the sort order of the results so the most recent (rather than the initial) comment is at the top.
View Replies
ADVERTISEMENT
Apr 22, 2013
I have a query with a float/delta column which is the expression:
Code:
Float: [Date1] - [Date2]
When I try to change the order by in the column filter drop-down i get a data type mismatch in criteria expression error.
View 1 Replies
View Related
Nov 29, 2004
How do I change the sort order to display on a form using an option button?
Thanks!
View 1 Replies
View Related
Jul 23, 2013
I want to use buttons on a form to change the sort order on a continuous form. In the buttons click event I am using a public function (named Sort_1) to change the sort order. The first element of the event call is the name of a generic query (named Sort_1_Query1) and the query field to sort (LAST_NAME OR FRIST_NAME, depending on the button.)This is the Click Statement.
=Sort_1("Sort_1_Query1","LAST_NAME")
This is the Public Function
Public Function Sort_1(SortName As String, FieldName1 As String)
DoCmd.ApplyFilter SortName, FieldName1 & "between 'A' and 'Z'"
End Function
I think the problem is in the use of quotation marks or trying to pass the query field name to the Do Command or the use of an ampersand.
View 4 Replies
View Related
May 8, 2005
I have a subform embedded in a mainform which contains loan payment details over a number of months. The record starts with the payment period number ie 1,2,3 etc. The problem is that every now and again the subform changes the display order of the records so that I get 4,5,6,1,2,3.
When I look at the underlying table the order is OK as is the non embedded sub form. I cannot see any reason for the change and it only happens randomly (apparently).
The numbers are not autonumbering but manually input.
Hope someone can help please.
View 1 Replies
View Related
Feb 13, 2015
I have Field "BC1Chng" which requires user input. I want to be able to write a code to reference to "BC1Chng" if there is an input in that field for any record...I want to copy the Remarks into each record in the Remarks Field.
I was able to get the remarks1 field to loop through each record copying what was in that field into each record.
Now I want it to look at the BC1CHng field and only copy to remarks1 field if there is any input in that field???
View 9 Replies
View Related
Nov 10, 2014
I have a table with entries describing a sequence of Tasks (tblTask)
tskID TaskDescription
10 Clean Room
12 Wash Dishes
etc
I have second table called Steps (tblSteps) that is related to tblTask via the field "StepNumber" which is a concatenation of [tskID] & "." & [StepOrder]
So if we look at washing dishes as a task then the steps are as follows:
StepID, StepDescription, StepOrder, StepNumber
202 Put plug in the sink , 1, 12.1
512 Turn on tap, 2, 12.2
205 Put in detergent, 3, 12.3
210 Place dishes in sink, 4, 12.4
435 Turn off tap, 5, 12.5
etc
If I decide delete the third step I get the following:-
StepID, StepDescription, StepOrder, StepNumber
202 Put plug in the sink, 1, 12.1
512 Turn on tap, 2, 12.2
210 Place dishes in sink, 4, 12.4
435 Turn off tap, 5, 12.5
Is there a simple way renumbering the StepOrder entries when one step is totally removed to give me the following?
StepID, StepDescription, StepOrder, StepNumber
202 Put plug in the sink, 1, 12.1
512 Turn on tap, 2, 12.2
210 Place dishes in sink, 3, 12.3
435 Turn off tap, 4, 12.4
View 6 Replies
View Related
Dec 6, 2013
I am currently studying Robert Jennings book entitled Using Microsoft Access 2007 Special Edition. In reading about specifying of the sort order and top value limits established by inner joins (pg 455), the author makes this statement.Access displays query result sets in the order of the index on the primary key field of the table that represents the one side of the top most one-to-many relationship of query tables.An example of a query with Orders, Order Details, and Products tables displays rows in productID (the primary key field in the Products table) sequence. He says that it does so because the Products table has a one-to-many relationship with the Order Details table and indirectly with the Orders table. I do not understand why the Products one-to-many relationship with the Order Details table is ranked as the top most relationship in that the Orders table also has a one-to-many relationship (OrderID is the primary key field) with the Order Details table and an indirect relationship with the Products table. The Order Details table has two primary keys (ProductID and OrderID). My attempts to change the sequence in which the table relationships were formed as well as the location of the tables in the database had no effect on the result.
View 2 Replies
View Related
Aug 23, 2004
I would like all the changes made to fields on my form to be automatically entered into a history list on the form. I can't seem to get the right code for this. I would like it to have the date and time the change was made also. Can someone help me. I have Access 2003 and Win XP. My form is unbounded.
Thanks,
Lisa
View 4 Replies
View Related
Apr 29, 2008
I am working with Access 2003 and want to save the sort order in a subform. The new sort order would be different from that of the underlying table. The Order By property has been set but isn't working the way I expected. I have tried replacing the underlying table with a query but that hasn't worked out either. I don't want to change the order of the table because other programs that access it would be affected.
I've been reading about an Order By On switch that might do the trick but apparently it's not contained in Access 2003. There must be some other way to skin this cat!
Thanks in advance.
View 4 Replies
View Related
Oct 2, 2005
Hello,
Is their a a way I can have a button or something in which duplicates all the data in the text boxes instead of re-entering data?
Also how can I sort data (DATES) that is in a form in descending order.
Thank you,
Onofrio
View 5 Replies
View Related
Mar 4, 2014
I have a tabbed form. The main form is titles ContractDtlsFRM. There are 3 other subforms in separate tabs. The first field in the ContractDtlsFRM is Contract No. I would like the form to sort in ascending order by this number.
I tried entering the following code in the Forms Order By event but it didn't work
Private Sub Form_Open(Cancel As Integer)
Me.OrderByOn = True
Me.OrderBy = [Contract No]
End Sub
View 2 Replies
View Related
Aug 14, 2013
Essentially I have a table for rooms around my school and what the rooms contain. Most of the details for the rooms are Boolean (e.g. If the room has a projector, Yes/No).
So what I am trying to do is have a form where i can select a checkbox(s) and if i tick one, a query that holds all the room details will only show rooms with projectors in them, which i can then display those results in another form.
My question is how do I get the check boxes in the form to narrow down the room results to only show the ones with the criteria i have selected in the form?
View 1 Replies
View Related
Dec 27, 2014
When I'm applying a sort and filter in a form, Access is updating the Filter and Order By properties of the form, so that it is possible to re-use in conjunction with Filter on Load and Order By on Load properties. However, a consequence of this is that when the form is closed, it prompts the user whether they want to save the design of the form. I want to circumvent this as I don't want to re-use the sort and filter and I don't want to be prompted to save the design of the form.
Although I can circumvent this by closing the form using a method that doesn't prompt for saving, the additional complication here is that the form in question is in the Navigation subform of a Navigation Control. Hence when I click on a another Navigation button, it (not me) closes my current form and hence prompts me whether I want to save the design of the form (if I have been sorting and/or filtering). I can't see how to circumvent this and the prompting is resulting in unacceptable usability.
View 2 Replies
View Related
Dec 2, 2014
How do I change a txt box to a memo field on a form? (I need to allow for more than 255 chars...) I've already set the backend DB (sql server) to accept the many chars, and the linked table access see's the datatype as memo. But I can't figure out how to get a memo field on the form, or how to change the current txt box to a memo control to support the extra characters.
I've been looking for 20 minutes... I guess I never used a memo field before, since I can't find/see how to set this.
View 12 Replies
View Related
Aug 6, 2012
I'm setting up a college database. On my enrollment form i have the following fields
Enrolment_ID
Student_ID
Course_ID
I'm receiving the error in my Student_ID field. It's telling me a related record is required in my Student Table.
The drop down shows the student name/date of birth/Education number
But if i set it to just show the ID it works fine, is there a work around for this as it will make life a lot easier for the dropdown to display the student names rather than the ID?
The dropdown is based on a query i have of accepted students....
View 2 Replies
View Related
Jun 24, 2014
I would like to change the background color of a field that is the result of a Unique Values query. I am trying to get a list of invoices where all the line items are approved. I can't seem to get it to work the way I want because if even one invoice line item is approved it will show up as approved.
Is there a way to change the background color of the invoice field to red if ANY of the Approved line items are = False
View 7 Replies
View Related
Aug 6, 2013
I have a comment box that was just for text. I have been asked to adapt this to allow a web URL to be typed in which would then become a clickable hyperlink (like typing in a Word document). Is this possible?
View 3 Replies
View Related
Oct 10, 2005
How do you change a file's sort order from ascii to international?
View 3 Replies
View Related
Feb 11, 2007
Hi all, I am new to this site and I am hoping that I might be able to get some help with my database which records address information of people reqesting a brochure or making a hotel booking. The problem that I am having is that the addresses are sorting in post code order, I have selected remove filter/sort and this does not do anything. I would like the records to stay in the order that they are entered at I also use this for a merge with a brochure/deposit letter and it is much simpler if I can merge a block of entries.
Many thanks in advance Pat.
View 6 Replies
View Related
Apr 18, 2007
Supposed I have the following tables:
TableMonthlyReport consists of the following fields:
*IDStore
*Year
*Month
*IDCatalog
*IDItem
Quantity
TableGoods:
*IDCatalog
*IDItem
ItemName
IDSupplier
The asterisks indicates the index keys. While TableMonthlyReport has 2 links of relationship with the TableGoods on IDCatalog and IDItem.
I have a data entry front end for monthly report. I have no problem to have the record source for this purpose.
I just need that the sort order of the item (in the front end) in a way that they could be managed differently on different period. For example, in March to April 2007 I want the items shown in the following order: A B C D ... While in May to August 2007 I want the items shown as B D A C ....
I tried to create an order table just like this:
TableGoodsOrder:
*IDCatalog
*IDItem
*ValidStart
ValidEnd
OrderItem
It is linked with the TableGoods on IDCatalog and IDItem.
The first order list (March - April 2007) will have the ValidStart of 703 and ValidEnd of 704. While the next order list will have the ValidStart of 705 and 708. The last 2 digits stand for the month, while the first digit is to indicate year.
The SQL query for the record source works but I can not enter any value. So, the idea of having a special table for sort order is not OK.
Can anybody give me a clue for the solution?
View 2 Replies
View Related
Dec 6, 2005
I have a table in MS Access with records including dates. The dates are date/time data type and formatted as short dates. They display properly in the table.
However, when I run a query (SQL shown below), it sorts the dates strangely.
Any ideas??
SELECT DISTINCTROW Format$(tblChat.dtDate,'Short Date') AS ChatDate, Sum(tblChat.TCT) AS SumOfTCT, Sum(tblChat.NC) AS SumOfNC
FROM tblChat
GROUP BY Format$(tblChat.dtDate,'Short Date')
ORDER BY Format$(tblChat.dtDate,'Short Date');
Here’s an example of the sort order in the query.
10/31/2005
11/1/2005
11/10/2005
11/11/2005
11/12/2005
11/14/2005
11/15/2005
11/16/2005
11/17/2005
11/18/2005
11/2/2005
11/21/2005
11/22/2005
11/23/2005
View 2 Replies
View Related
Nov 3, 2006
Is there a way to sort dates using "Decending" but have blank dates stay on top?
I have a listbox based on a qurery that displays all pending and completed jobs. The query sorts (Ascending) the "Job Complete" date. This conveniently puts all of the pending jobs with null values at the top of the list. The bad part is that this puts recently completed jobs at the very bottom of a (thankfully) long list. Is there a way around this?
Thank you!
View 5 Replies
View Related
Mar 2, 2005
Okay, here's my new dilema. I'm in the military and rank is one of the fields in my DB. The only issue I'm having is that I would like to sort by seniority, not alphabetically. For Example, I've listed a few ranks below in the correct order from greatest to least. Is there some way that doesn't involve a page of code to achieve this? Thanks.
Colonel
Lt. Colonel
Major
Captain
1st Lt.
2nd Lt.
View 8 Replies
View Related
Mar 14, 2005
I have a query that fills a report that I have in an Access 2000 database. This report needs to be sorted by the following:
Code:ORDER BY tblPrimaryDept.PDName, tblSubDept.SDName, tblKeyStrategy.KSID, tblKeyInitiative.KIID, tblKeyDeliverable.KDID, tblSubDeliverable.TargetDate, tblQuarters.QID;
It's working fine, but .... (There's always a but)
tblKeyStrategy.KSID can be null, so therefore, it is sorted by null records, then ascending order tblKeyStrategy.KSID. What they client wants is it to be sorted by tblKeyStrategy.KSID first, then the null value ones.
ie:
So as it stands it currently does this:
Finance
Finance
Finance 1
Finance 2
Now they want it to do this:
Finance 1
Finance 2
Finance
Finance
Is there any way this can be done? I've been looking, but haven't seen anything regarding this.
Thanks for any assistance you can give me on this.
View 13 Replies
View Related
Feb 25, 2014
Basically working on a Customer Order Database for my carpet shop.
I have a Customer, Job and Order table. The order table contains the line items for each job and each customer can have many jobs.
I have a field in the Order table showing the item order status being either "Instock", "To be Ordered" or "Ordered"
I also have a Job Status field in the Job Table
I would like that Field to be automated depending on the item order status for each item on the job.
At the moment the Job status is a manually selected drop down box of either; 'Ready To Fit', 'Awaiting Stock', 'Items To Order' or 'Job Complete'
For example if all of the items had a item order status of 'Instock' then the Job Status would display as 'Ready To Fit'
If any of the items were 'To Be Ordered' it would display as 'Awaiting Stock'
I dont know how i would solve the situation of some marked as say 'In Stock' some 'Ordered' and some 'To Be Ordered' ????
Also the 'Job Complete' would come from another field in the Job Table marked with a check box...
View 5 Replies
View Related