473,216 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Years in a Subform Not In Order

3 2Bits
I have an Access form with a history subform embedded in it. The history subform consists of years, 2001, 2002, 2003. When someone renews a membership, I add the year to the subform. Always before the year went at the bottom of the subform and stayed there. For some reason the last few entries I made puts the year in the penultimate row, not the final row. I haven't made any changes to the program, so I don't know why this is happening. 2021 should not come before 2017, for example.

I am using Access 2016 on a Windows 10 on a PC.
Feb 1 '21 #1

✓ answered by NeoPa

Hi Linda.

If you specify the order of the data within the form then you can expect it to show in that order. However, if the order isn't specified then it could come in any order that makes sense to ACE, the database engine used by Access (Or Jet for much older versions). It can be very hard to predict what it will decide on so, if it's important for the user to see the data in a particular order then it's better to specify it within the design of the form (Order By in the Properties).

5 1348
NeoPa
32,554 Expert Mod 16PB
Hi Linda.

If you specify the order of the data within the form then you can expect it to show in that order. However, if the order isn't specified then it could come in any order that makes sense to ACE, the database engine used by Access (Or Jet for much older versions). It can be very hard to predict what it will decide on so, if it's important for the user to see the data in a particular order then it's better to specify it within the design of the form (Order By in the Properties).
Feb 1 '21 #2
lindadee
3 2Bits
Thank you NeoPa. "Order By" is just yes/no/blank. It was originally blank, but I changed to yes. That messed things up even more, so I set back to blank. As an example I want the years in the subform to show as follows:

2010
2011
2015
2017
2018
2020
2021

I didn't originally create this program, so I'm not sure how the dates are ordered. Adding a date in the subform adds it to the table Membership History.

Thank you for any assistance you can provide.
Feb 1 '21 #3
NeoPa
32,554 Expert Mod 16PB
LindaLee:
"Order By" is just yes/no/blank.
I'm not sure exactly what it is you're trying to say with that, but I can assure you that it isn't correct. Sorry to be blunt but whatever it is supposed to mean is a long way from correct. Where did the idea come from? What led you to believe such a thing?

The Order By property of a form is a Text value that lists the Fields used to order by, in the order you want them ordered by if there's more than one of them. In your case I suspect there is just the one field, which is where you store the date data. If you set the value of the Order By property to the name of that field then I expect the form will work for you as you expect & hope.
Feb 2 '21 #4
lindadee
3 2Bits
Sorry, I misunderstood your original response and didn't see any dropdown in the properties. I added "Year" to the Order By" and that solved my issue. Thank you very much.
Feb 2 '21 #5
NeoPa
32,554 Expert Mod 16PB
Hi Linda.

Apology not required. There is no blame to being in a position where you don't understand - as yet. I was merely curious & confused myself as to where such an idea may have come from - and wanted to be very clear that it was mistaken. That's for your benefit, but also the many thousands of people who are likely to read this thread later after you're completely done with it.

As it happens, I was wondering, in my confusion as I can sometimes be like a dog with a bone, how that might get to be confused and I thought about the OrderByOn property - which of course is a Boolean (It takes Yes or No values.) - and I wondered if perhaps you'd been searching and came across that one. I hadn't mentioned it as, though it's certainly accessible by VBA code, it isn't one of the properties that shows when you're designing the form on the screen. I felt that would just make life more complicated for you.

The OrderByOn works with OrderBy and allows you to remove filtering temporarily without losing what it is you're filtering by. If you turn it on again later (OrderByOn=Yes/True) then it filters the same way you had it before.

Anyway, I'm very pleased to hear that your problem's now solved :-)
Feb 2 '21 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: ivan | last post by:
I have a form (CustomerImfo) that has a subform within it (order). Within that subform is another subform (OrderDetail). That subform (OrderDetail) is displayed in Datasheet view. When I am...
4
by: CSDunn | last post by:
Hello, I have a combo box (Combo7) that needs to call a function during the After Update event of the combo box. The function resides in an Access 2000 ADP Module called MMAnswerData_code. The...
3
by: DaveUssell | last post by:
Thank you for being here. I've bashed my head without help so far, but I'm rapidly running out of time and could use a hand. I don't think it should be too difficult for an experienced Access...
3
by: DeanL | last post by:
Hi Guys, I've been handed a database (Access 97) that is a couple of years old that no one has maintained and is now experiencing a problem. The database is used to run several reports based on...
5
by: blakerrr | last post by:
Hi everyone, I have a form called Master Order with a subform in it called Order Info. The subform has a nested subform in it called Order Details. Master Order cycles through all of the parts...
1
by: pyotr | last post by:
Hello,,,, I have a form with its subform that is filtered through the combination of two independent comboboxes to facilitate administration. However, I want to arrange/sort the viewed...
5
by: dio66 | last post by:
Hi, Im basically a Newbie in this posting of new threads and in the MS Access as well. I spend a lot of hours trying to get this answer out of the Internet and 6 different books of MS...
2
by: ruth m | last post by:
I have inserted three tab controls on a form and wish to insert a different subform on each tab page. I have inserted the first subform (order details) - however, the problem is that it appears on...
3
by: accessbeginerry | last post by:
I have a form with subforms on it (subforms are designed on tabcontrol and each has separate page) After user enter information on form and tries to hit "Save" button i would like the access...
0
by: Gordon Padwick | last post by:
A form contains controls, one or more of which can be other forms. A form that contains another form is known as a main form. A form contained by a main form is known as a subform. A subform itself...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.