Forms :: Setting Sort Order On A Form With Multiple Subforms

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 Replies


ADVERTISEMENT

Forms :: Use Buttons On A Form To Change Sort Order On A Continuous Form

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

Forms :: Tab Order With Subforms And Subdatasheets

May 31, 2013

I have a continuous form with a bound subform in the footer section. Is there a way (with VBA?) to set the tab order so that it tabs down to the subform in the footer after a few controls in the main form and then back to the main form after going through the subform?

Also I have a form with a subform in datasheet view. Can I have the tab order set so that it tabs through a few fields in the datasheet view, expands the subdatasheet and allows you to tab through it, then tab back to the main datasheet?

I want users to fill out a few fields in the main form, go the subform easily, enter the data there, then go back to the main form easily and enter the rest of the data before going to the next record in the main form.

View 2 Replies View Related

Sort (order) Data On Forms

Apr 12, 2005

Hello,

This is related to "Old_value, new_value" thread I posted yestarday (Module&VBA).

I have a problem i missed yestarday. The code it's vorking great, but it allways takes the showed new_value and makes it old_value for the new record, and this is a problem, because the showed record is not the last for that customer.
So, I was thinking that if I make a new Autonumber field in my table, I could sort descending the values and this way the input form will allways show me the last entered data for that person.
As I noticed from a long time ago, if I sort a table that allready has a form, the form won't show the records sorted. Why? It's necessary to make the form again? I tried to order the data on the form from Properties window ->Data->Order by, but the ordering is Ascending and I need it Descending!
Can enybody help me?

Thanx,
Attila

View 1 Replies View Related

How To Set Tab-order In Form With Subforms?

Sep 8, 2006

Hi!
I've developed a big main form with subforms on. All'n all there are lots of controls on all these forms. (4 subforms in the "main" form).

As I've added controls now and then, they are not added in order from top left to bottom right.

Anyone know if I can set taborder even for the subforms?

Cause now, the tab-order is bad.

Thanks for any help ;)

View 2 Replies View Related

Forms :: Custom Sort Order In Subform

Apr 28, 2015

I have a subform with year and month, subform shows result of a select query.

When I open query separately it show data as required order but when i show data in subform related to this query, data show in rearrange order.

How can I set order in subform as query result.

View 3 Replies View Related

Change Sort Order On Form

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

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

Forms :: Date Sort Order - Newest To Oldest

Dec 17, 2013

I have a combobox (cbo_FileNames) that is unbound and gets fed on activate from a folder

Code:
Set SourceFolder = FSO.GetFolder("c:GundogManagerBackUp")

My problem is that the file names are as follows:

GundogManagerBackUp 02_12_13.xls
GundogManagerBackUp 03_12_13.xls
GundogManagerBackUp 07_08_13.xls
GundogManagerBackUp 16_11_13.xls
GundogManagerBackUp 17_12_13.xls

As you can see it consists of the name and a date of the backup. When it populates the combobox I want it to go in date order I newest to oldest. At the moment its going of the first number.

View 9 Replies View Related

Forms :: Main Form With Multiple Tabs - Sync Two Related Subforms

Jul 28, 2014

I have a main form with multpile tabs - each tab containing a different subform.

Link Master Field: ClientID (field in Master Form)
Link Child Field: Client ID (field in all subforms)

There is another field that all the subforms (continuous type) have: ObligorName. All the subforms are based off of a huge table (subtable) with fields: Obligor Name, Address, Zipcode, City, DOcuments Required, Bank Account Number, etc......

Essentially, the user will fill in the 10 obligor names associated to ONE client on the first subform on the first tab + address + zip code + city.

When the user clicks on the second tab to fill out the next subform, I want all 10 obligor names to be there already, so then they can fill out Documents Required + BAnk Account Number.

If I fill out the first subform and then exit out of the form and then reopen it, the other subforms autofill.

HOWEVER, I dont want to have the user have to do this. It wastes a lot of time. What can I do about this so that the table is automatically updated right away. They are all based on the same table so I do not see why there is so many issues.

View 14 Replies View Related

Duplicate A Form And Sort A Form In Ascending Or Descending Order?

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

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

Forms :: Setting Tab Order On Forms

Jul 2, 2015

I have a form which contains a sub form. I have set the tab order on both forms and set the Tab stop to those I don't want. when I open the Form the cursor flashes in the sub form and I cannot find where or how to have the cursor flashing on the main form. It needs to be there because I want to select data that will edited in the Sub form.

View 3 Replies View Related

Forms :: Timesheet - Filtering Multiple Subforms

Sep 22, 2014

I have a form for timesheet entry that has 2 subforms.

The main form has a combo box for selecting staff name and another for WkEnding date. The form is based on table "SELECT StaffRef, WkEnding, Status FROM tTimesheets".

SubForm sfTimesheets is based on table tTimesheets. The subform is linked by StaffRef and WkEnding. (This has been working for ages.)

Recently added second subform sfOnCall based on table tOnCall. The subform is also linked by StaffRef and WkEnding.

If the user has a timesheet entry for the date, then sfOnCall displays and operates ok. But if there is no entry in the timesheet table, the sfOnCall form doesn't show the appropriate entry from the OnCall table.
-
I did try basing the main form on a UNION of the 2 tables, but whilst the query showed the correct data when I ran it - all the controls on the form disappeared!

View 3 Replies View Related

Sort Order

Oct 10, 2005

How do you change a file's sort order from ascii to international?

View 3 Replies View Related

Multiple Tables, One Form With 3 Subforms Problems

Dec 16, 2007

Hi Guys & Gals, I have an Access 2007 database that I am fighting with. I have a friend who needs a data entry database. So far I have created 4 tables: Cases, Customers, Data1, Data2.
Cases_tbl has following fields:ID(autonumber), Customers_ID(number), Data1_ID(number), Data2_ID(number).

The Customers, Data1 and Data2 Tables are all similiar, they all have the ID(autonumber) Field followed be fields that need data inputed.

I would like to have the Cases table as the master table that is linked to the other 3 tables, so when I delete a customer, there case, and all of there data is deleted with it.

I have one form with 3 subforms. Each subform is used for inputing data into the customer, data1, and data2 tables. However, I cannot for the life of me link all these tables together. I have tried all different relationships and have search the web high and low and I cannot find an answer anywhere. So if somebody could help I would be much appreciative.

View 11 Replies View Related

Problem With Sort Order

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

Dynamic Sort Order

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

Sort Order Problem

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

Sort Order Question

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

Specific Sort Order

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

Need Weird Sort Order

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

Sort Multiple Fields In A Split Form

Apr 30, 2014

I have a split form with 10-15 fields. Each of these fields is a combo box. The trouble I am having is sorting the data in the datasheet of the split for. I want to sort ascending by "ProductTypeName", then ascending by "Parent SKU" and then ascending by "ProductSizeID".

How can I do this when each of my combo boxes have an ID and then a name? Example below:

ProductTypeID
ProductTypeName

1
Apron - Bib

2
Apron - Waist

3
Bag - Backpack

4
Chef Coat

[Code] ......

View 3 Replies View Related

Access Changes Sort Order On Paste

Mar 7, 2008

Hi all,

I'm quite new to access, and have a pretty straightforward problem (I hope):

I have a table with 300 records in 10 columns. I want to:
1. filter the data based on column A (gives me 150 visible records)
2. Copy from an excel spreadsheet which exactly matches the access table (single column only, 150 rows)
3. Paste into a new column I created in the access table

Unfortunately, when I hit paste in access, it loses the filter and pastes the data into the complete dataset (i.e. into the wrong records).

I've no idea why access won't keep the filter I set. I also tried numbering the records and sorting them based on this new column. Again, Access lost the sort order before pasting the data.

Help!

I really need to be able to paste my excel data into the table in access!

Can anyone shed some light for me?

Thanks in advance,

Lee

View 4 Replies View Related

Customize The Sort Order Of A Combo Box

Dec 7, 2005

i have a combo box on a payment form which shows existing permit #s. i'd like to make the sort order show the most recently added permit first. i clicked on the build button next to RowSource on the data tab of the properties of the combo box which opens the query my combo box is based on. there are only 3 sort order options...ascending, descending, & not sorted. can this be done?

the permits form has a button to open the payments form (payments can also be opened alone too - ie. if somone applies for a permit today but pays for it tomorrow...). usually this will not be the case but that is why i have to keep it either combo or list.

all help is appreciated.:)

View 3 Replies View Related

Sort Order Of Unbound List

Sep 15, 2006

I need to manage a list of, in this case "medications", with this list the most common "meds" are on the top of the list. there will be at times new "meds" added that should be at the top of the list. I want to create a unbound box that will let me drag the "meds" up or down in the list. The best emample i know of is the way you can set the "Tab" fields on a form to move the tabs stops.

View 4 Replies View Related







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