There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Business Applications
Tag Cloud
audio blue blue screen boot bsod compaq computer cpu crash dell drivers dvd error excel firefox format freeze freezing hard drive install internet internet explorer kb951748 lan laptop loss of internet malware memory motherboard network networking outlook outlook 2007 problem restart screen security slow sound startup trojan update virus vista windows windows xp winxp wireless zone alarm zonealarm
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Access 2003 Form question


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

 
Thread Tools
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
11-Oct-2008, 08:19 AM #31
Have you tried setting the "Sort Order" that you require in the Query supplying the Form's data?
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
15-Oct-2008, 10:41 AM #32
It will sort properly if I only choose one of the planner codes. If I choose the entire range of planner codes for 2007, for instance, then it doesn't sort properly to the form.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
15-Oct-2008, 10:47 AM #33
Can you post a copy of what you have now and what you select so that I can reproduce it?
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
15-Oct-2008, 10:54 AM #34
Thats a tough nut to crack as the best way to see what I'm talking about is to look at it with live data and the stuff thats in there is confidential.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
15-Oct-2008, 11:26 AM #35
Have you set more than one Column in the Query to sort the data, including the Planner Codes?
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
15-Oct-2008, 12:36 PM #36
I have only set the planner codes columns for 2007 buy history to sort descending.

In the tsg file that you provided to me the columns that are selected for sorting are all planner code fields (B0 through BR) for range tblBuyHistory2007Cross_1.

What seems to happen is it sorts by B0 if it can, if not it will move to B1 and so on.

Where this presents an issue is if the filtered fields are focused on say, B5, but the suppliers have data in all fields, B0 through B5. This skews the sorting.
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
28-Oct-2008, 12:19 PM #37
Any ideas or am I looking at Access not being able to do what I'm looking for?
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
28-Oct-2008, 12:21 PM #38
Can you post me what you currently have with precise instructions of what to ask for and what Output you want?
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
28-Oct-2008, 06:44 PM #39
OK, I've cooked up some data to put into the sample db we have been using.

What I am experiencing is that the final sort of supplier does not change regardless of how the user looks for their data. For example, lets just focus on UL/B0, NM/B1, and Tubes/B2. Feel free to choose these at your leisure, just make sure you choose the 3rd party supplier type as thats what the sample is all loaded as.

The final sort of suppliers for Ul, NM and Tubes all are the same even though the query is set to show suppliers in descending order based on spend. What I need to have is that the final sort of suppliers is in proper descending order based on the begining Modality (UL, NM, or Tube)

I hope I am explaining this well enough for you to understand...
Attached Files
File Type: zip tsg.zip (266.5 KB, 2 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
29-Oct-2008, 02:38 PM #40
Ref, I have no idea where the Query and Form are getting the Supplier Name as the Sort field from.

But I have solved your problem for you.
All we have to do is use some VBA to set the Form's Sort Order to the Chosen Planner Code and then switch on the Sort By.
I have only done one Planner Code, it is the Tube - BR and you can see the code in the Form's "On Open" Event Procedure.
Do you think you could manage to do the rest based on the Code that already exists for the On Current Event and this new Code?
Attached Files
File Type: zip tsg.zip (217.0 KB, 3 views)
__________________
.
.
OBP
I do not give up easily
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
30-Oct-2008, 12:05 PM #41
Hmmm seems something is funny here. When I choose tubes/B2 and then click third part I get a parameter pop up. If I click ok and leave the parameter blank it sorts by supplier name.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
30-Oct-2008, 12:28 PM #42
That is odd because I have just checked and it is working fine.
I have also downloaded the version that I put on the Forum and tested that as well.
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
30-Oct-2008, 12:39 PM #43
OK, I looked in the VBA on open and saw that it specified to sort on BR. Tubes is B2 so I changed it from BR to B2.

I am confused by the OrderBy with the " ' " notation in the on current section above that. Doesn't the ' notation set the command aside as programming notes?

In any event, here is what I adjusted it to and it gives the parameter pop up.
Attached Files
File Type: zip tsg.zip (378.8 KB, 2 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
30-Oct-2008, 12:51 PM #44
Ref, on your version I get a pop asking the B2 !
Is that wierd or what?
Can you do the rest of the VBA to use the other Planner Codes?

The " ' " works because it is in quotes and Access accepts it as an alternative quote to ".
So it is the accepted way of using double Quotes as 2 sets of ""
__________________
.
.
OBP
I do not give up easily
Ref2335's Avatar
Computer Specs
Member with 87 posts.
 
Join Date: Jun 2006
30-Oct-2008, 01:05 PM #45
No problem, I'll add the ' statement to the remaining if statements to the in current code and will add the if orderby to the on open. Should it be just a collection of "if, then" statements there or "if then else"?

I wonder if we are getting the parameter pop up because the order by box is blank on the f_mvs suppliers properties?

Also it seems its still not sorting properly...
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:40 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.