Saving A Form's Sort Field

Sep 16, 2005

I have a form that has a bunch of project information and scrolling buttons at the bottom to browse by next/last.

Right now the form is sorted by the ID associated with the project, which kinda sucks because they were and are not put in alphabetically.

I discovered if you right click on a field and click "Sort Ascending" or the opposite it works fine but when I open the database it is right back to normal ID sort

I have checked the Data and Other tabs but can't find anything with regards to this as well as I have tried sorting the actual table by name and that changed nothing.

Any help would be greatly appreciated.

View Replies


ADVERTISEMENT

Saving Sort Order In A Form

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

How To Sort Number Field In A Form

Aug 1, 2012

I have a form where data can be added and it has different tabs. The 3rd tab has idVersion field and Comment field where users can add the version and comment, if needed. When they need to add another version, the blank fields will be added as next row, so on and so forth. The problem is users are adding a lot of versions but not sorted. So for example:

Row 1 of the form: idVersion field is "1" and comment has "Test 1".
Row 2 of the form: idVersion field is "8" and comment has "Test 8".

Row 3 of the form: idVersion field is "2" and comment has "Test 2".
Row 2 of the form: idVersion field is "5" and comment has "Test 5".

So how can I fix it where after they saved the version and comment, when they close the database and re-open it again, the data will show up as:

Row 1 of the form: idVersion field is "1" and comment has "Test 1".
Row 2 of the form: idVersion field is "2" and comment has "Test 2".
Row 3 of the form: idVersion field is "5" and comment has "Test 5".
Row 2 of the form: idVersion field is "8" and comment has "Test 8".

So even if they add a new version and comment (example version "3"), it will be automatically sorted when the database is reopen.

View 6 Replies View Related

Saving A Form Field Into A Table

Aug 15, 2005

Help!!
I have a form created on a query. I created a field to add up the cost of all components on the form and now I need to save it to a field in a table so that I can run a report (my invoice)! Any suggestions??

View 3 Replies View Related

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 5 Replies View Related

Sort Subform Records On Numeric Values Stored In A Text Field On Main Form

Sep 25, 2015

I have developed a database but have had difficulty with sorting data within subform of a main form. The subform displays the related tasks that correspond with main form that has been selected. Within the main form I have also created a text field that defines a particular sorting sequence of the tasks found within the subform which is titled Task Sequence. What I would like to do, is use the Task Sequence field to sort the order of tasks within subform. I have tried: IIf([ID] Is Null, 0, Val([Task Sequence])) within the Advanced filter/sort but either it shows only the first task defined in the Task Sequence or it wants to filter the main form and not the subform.

View 14 Replies View Related

How To Sort The Field List

Aug 8, 2013

When I "Add Existing Fields" I'd like the list to be sorted alphabetically...how to do this?

View 4 Replies View Related

Unable To Sort Field

Aug 17, 2013

I created a table by importing data from an Excel spreadsheet. Now I have discovered that I am unable to filter the data, i.e. do an ascending and.or descending sort, in the first field of the table, which is a long text field. It is the only field that has text, all others are yes/no fields. Is there any way to fix this?

View 5 Replies View Related

Saving A Calculation Field

Aug 12, 2005

Having some problems with a calculated field on a form. The field came from my table but I typed in the calculation (=[cost_price]+[sale_price]) and it works fine but it wont save to my table so when I run a repot off it doesnt have any of the calculated values because they arent saved in my table??? Can anyone help?

Thanks
Tom

View 2 Replies View Related

Forms :: Field Not Saving

Dec 29, 2014

On a form there is a sub form.On the form I can only cycle through the records that have been created since the last time the form was opened. I cannot cycle through all records. Is this normal for a form. I assume some code might change this behavior.

More importantly when I look at the sub form in datasheet view I notice the first field of each record is not displayed (saved?) unless it is the very last record created. (This field has a SQL statement as a row source). Is this normal - or are the last 2 paragraphs descriptions of the same thing?

View 2 Replies View Related

Saving Default Value To Field

Jan 7, 2012

I have a List box set to YES and default value set to YES.I would like to hide this field and when I click SAVE in my form, I would like to save it to my table.I did set the control source to the field that I want but somehow it is not working unless if I click on to YES then save.How do I set it in such a way which will save even without me clicking on to the LIST BOX?I want the default value to be saved when I click SAVE command button.

View 3 Replies View Related

How To Sort By A Calculated Field In A Query?

Jul 21, 2006

I have a query that draws from two tables, and the field in question looks like this:

X: [TableData]![FieldA]*[TableNumbers]![A]+[TableData]![FieldB]*[TableNumbers]![B]


It all works fine and dandy, but once I set it to sort by this field and run the query, it gives me the parameter prompt, asking me to enter the Parameter Value of FieldA and then for FieldB.

Is there a work-around for this within the query?

The only other solution I have in mind is making another table from this query, and then creating another query just for sorting said table, but that seems inefficient at best.

View 2 Replies View Related

Sort On Calculated Date Field

Mar 16, 2008

I have an expression in a query

Expire: IIf([payterm]="X","",DateAdd([payterm],1,[orderdate]))

However when I sort it it does not sort in correct manner

it's goes like

1/11/2007
1/15/2008
10/10/2006
10/16/2007
10/31/2007
10/5/2006

I have the field properties set to Short Date.

What do I need to do for this to sort right?

View 2 Replies View Related

Sort A Lookup Field That Has Dates In It

Sep 14, 2004

I have a lookup field for my table that pulls its data from Pay period table

When I click the drop down in my table, the dates aren't in any order. I think this is because lookup fields are considered text fields.

Is there a way to sort my drop down box on the table?

KellyJo

View 2 Replies View Related

Help Deleting Sort/grouping Field??

Sep 19, 2004

I am trying to remove a "sort and grouping" field from my report. I delete the field from the menu by using the "backspace" key on my key board. I am getting any error, invalid sort field. When I put something into the field, the error goes away. How do I delete a sorting field I do not want??

thanks for your help
newbie and learning

View 1 Replies View Related

ASC Or DESC Sort Based On Another Field

Aug 12, 2014

I have a query that lists items in locations in our warehouse. Each location is broken down by Aisle-Bay-Level-Position, for example 50-101-01B; or 51-106-02 with all the even Bays on one side and Odd bays on the other side of the aisle. I have the query set up so it separates odd and even so I can go all the way down one side of the aisle then I have to walk back to the beginning of the aisle to check the other side.

What I am trying to do is change the sort based on another field that I have called SORT with a value of AZ or ZA depending on if I need that section to be sorted ASC or DESC. So for example all even bays in aisle 51 need to be sorted DESC while all ODD bays would be ASC. The way our warehouse is laid out it is not always the odd or even side that needs to be sorted DESC, that's why I made the SORT field. The formula I used for the SORT field is as follows:

SORT: IIf(([Aisle]='50' And [OE]='ODD') Or ([Aisle]='51' And [OE]='ODD') Or ([Aisle]='53' And [OE]='ODD') Or ([Aisle]='52' And [OE]='EVEN'),'AZ','ZA')

Is there a way to make it sort the BAY in ASC or DESC based on the value in SORT?

As an example here is how I want the order to be:

50-101-01A
50-101-01B
50-103-02A
50-103-02B
51-101-01

[Code] .....

View 1 Replies View Related

Why Is Currency Field Not Saving Pennies??

Mar 16, 2005

I have a currency field that is not saving pennies. (cents if you're Americian i suppose) :confused: if i put in pence it rounds it to the nearest pound.

I have tried setting the decimal places to "2", but that makes no difference :mad: :confused:

the table is called invoice

this also happens with the invoice form :mad: (i suspect for the same reason)

The database can be downloaded from:
http://www.tapestriesdirect.com/Garage.mdb (996KB)
or if you can unzip (who can't?!?)
http://www.tapestriesdirect.com/Garage.zip (86.1KB)

Cheers for any help

Graeme

View 2 Replies View Related

Field Calculation Not Saving To Database

Aug 26, 2005

I have the calculation =DateDiff("yyyy",[DOB],Now()) in the Data/Control source properties of a numeric field in a database/form which correctly calculates age in years from a date field DOB. How do I get this field to save to the database?
Georgina

View 2 Replies View Related

Sort On Total Field In CrossTab Query

Jan 11, 2007

Below is the sql code I have for a CrossTab Query. Total as GrandTotal
shows GrandTotal of all weekly columns. Is there anyway I can get the
Query Display to sort on the GrandTotal Column?

PARAMETERS [Forms]![Queries_ReportsFRM]![StartDateTxt] DateTime, [Forms]![Queries_ReportsFRM]![EndDateTxt] DateTime, [Forms]![Queries_ReportsFRM].[FaultCategory] Text ( 255 );
TRANSFORM Sum([Trends-1-3TON-WEEK].Totals) AS SumOfTotals1
SELECT [Trends-1-3TON-WEEK].SystemGroup, [Trends-1-3TON-WEEK].FaultCategory, Sum([Trends-1-3TON-WEEK].Totals) AS GrandTotal
FROM [Trends-1-3TON-WEEK]
GROUP BY [Trends-1-3TON-WEEK].SystemGroup, [Trends-1-3TON-WEEK].FaultCategory
ORDER BY Sum([Trends-1-3TON-WEEK].Totals)
PIVOT [Trends-1-3TON-WEEK].YearMonthWeek;

View 1 Replies View Related

Sort Alphanumeric Field - Code Problem

Dec 1, 2006

hi
i found this code here and it works IF the number comes first and is preceded by a letter
123AA

but it does not work if the letters come first
AA123

here's the code

Public Function GetString(WholeString As String) As String
Dim i As Integer
Dim Temp As String
Temp = CStr(WholeString)
For i = 1 To Len(WholeString)
If InStr(1, "0123456789.", Mid(Temp, i, 1)) = 0 Then
GetString = Mid(Temp, i)
Exit Function
End If
Next i
GetString = Temp
End Function

Public Function GetNumber(WholeString As String) As Double
Dim Temp As String
Dim i As Integer
Temp = CStr(WholeString)
For i = 1 To Len(Temp)
If InStr(1, "0123456789.", Mid(Temp, i, 1)) = 0 Then
GetNumber = Mid(Temp, 1, i - 1)
Exit Function
End If
Next i
GetNumber = Temp
End Function


the probelm is with this line but i'm not sure what it is

GetNumber = Mid(Temp, 1, i - 1)

(i also get runtime error 13) but my data is in the same format as the example i downloaded.

any ideas anyone?

thanks in advance and thanks to the person who created the code

View 1 Replies View Related

Saving Previous Unbound Field Values

Oct 5, 2005

hi

i have a form (A) with some unbound combo boxes which generate a subform (continuous) recordsource and the records output

after i filter the subform, i click on a subform record and open another form (B), and close form (A)

i do a bit of editing on form (B), then i click a button to go back to form (A).

is it possible to open the form (A), with the unbound combo boxes values at the same value as when form (A) was last closed, and as such the subform records output as per when the parent form (a) closed

if this is possible i can then have a button on form (B), to go to the next or previous record on the form (A) subform

apologies if this sounds confusing, many thanks in advance

View 1 Replies View Related

Saving Long Text To A Memo Field

Oct 21, 2004

I'm trying to save the contents of a text box into a memo field in a table, but after my code runs i look in the field and it is cut off after a hundred characters or so, and the last few characters are garbled. This is the code:

Code: DoCmd.RunSQL "UPDATE orderheaders SET orderheaders.Comments = [Text127] WHERE orderheaders.OrderNumber = " & GlOrderNumber & ""

orderheaders = table
Text127 = text box
GlOrderNumber = integer variable

Is there a way to do this with only code? (I dont want to do it by binding the text box to the field)

View 3 Replies View Related

Tables :: Saving Space In A Field On Table

Jan 27, 2015

I want to be but to save a space in a field on a table but every time I do it appears to be a NULL and therefore fails a validation rule that I wish to preserve.

View 14 Replies View Related

Contact Table - Filter Set For Field Not Saving

Dec 17, 2011

I Have a Contacts table, when I use the filter on the field that I want filtered I get what I want, no problem, however when I save that filter and close the table and then reopen it it the filter is gone, how can I save the filter that I set up?

View 2 Replies View Related

Forms :: Sort Putting One Record On Top Based On Yes / No Field

Mar 8, 2013

My table has 3 fields, Employee Number (text), Job Description (text) and Current (yes/no). The table keeps track of the Job Descriptions that an Employee has had along with his current Job Description (actually Title is more appropriate a word but client requested Description) So the table has records such as:

0001 - Floor Sweeping - no
0001 - Ceiling Cleaning - yes
0001 - Dumpster Turning - no

The yes signifies that that is the current Job Description for employee #0001 and the others with no are previous Job Descriptions that the employee #0001 has held.

Now - I created a form to add these records to the table and on that form I want a list box to show the records in the table for this employee but I want to sort it such that the current Job Description is listed first and the rest show up in alphabetical order following. I have the query to list all of the Description, but how can I get the current one to always appear on the top of the list?

View 14 Replies View Related

Queries :: Cannot Change Sort Order On Float Field

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







Copyrights 2005-15 www.BigResource.com, All rights reserved