473,396 Members | 1,834 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,396 software developers and data experts.

Index Problem

My table has 3-fields

No Primary Index.

FIELDA Index(yes Dupes OK), Required NO
FIELDB Index(yes NoDuplicates), Required YES
FIELDC NoIndex

I placed the following code in the OnLoad Event of a continuous form:
Me.OrderBy = "FIELDSORT"
Me.OrderByOn = True

I want FIELDA to be the main index and FIELDB to be secondary.
But the index insists on being FIELDB. Why???

Thanks Greg

Feb 3 '07 #1
5 1523
<Ap******@gmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
My table has 3-fields

No Primary Index.

FIELDA Index(yes Dupes OK), Required NO
FIELDB Index(yes NoDuplicates), Required YES
FIELDC NoIndex

I placed the following code in the OnLoad Event of a continuous form:
Me.OrderBy = "FIELDSORT"
Me.OrderByOn = True

I want FIELDA to be the main index and FIELDB to be secondary.
But the index insists on being FIELDB. Why???
What is "FIELDSORT"? If you want to sort on FieldA then FieldB use that in the
OrderBy...

Me.OrderBy = "FIELDA, FIELDB"
Me.OrderByOn = True

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Feb 3 '07 #2
Sorry
I placed the following code in the OnLoad Event of a continuous form:
Me.OrderBy = "FIELDA"
Me.OrderByOn = True
This did not work!

Feb 3 '07 #3
<Ap******@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
Sorry
I placed the following code in the OnLoad Event of a continuous form:
Me.OrderBy = "FIELDA"
Me.OrderByOn = True

This did not work!
Clarify "did not work". Does your form's RecordSource have a field named
"FIELDA"?

I though you wanted to sort on both FIELDA and FIELDB?
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Feb 3 '07 #4
Rick

Thanks for your response.
I do want to sort by 2-Fields, but to simplify - have been attempting
a single field first.

I have assigned the Forms value by code:
[Forms]("FL-FIELDEDIT2").RecordSource = strTable
The data shows just fine, but the data sort is only on the FIELDB.
Despite the Me.OrderBy = "FIELDA" and the Me.OrderByOn = True in the
OnLoad
event of the form.

I wonder if the Table indexes I mentioned are over-riding my effort?

Greg

Feb 4 '07 #5
Rick

I figured it out:

[Forms]("FL-FIELDEDIT2").RecordSource = strTable
[Forms]("FL-FIELDEDIT2").OrderBy = "FIELDA, FIELDB"

I was setting the OrderBy too late. After my subform arrived.
Sorry for the vague question. It wasn't easily described.

Greg

Feb 4 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Coppinger | last post by:
I have a problem that has raised a couple of questions. SITUATION: I have a table called pr_persona that has a composite key comprising pr_persona_db CHAR(2) pr_persona_id INT(11) auto...
1
by: J. C. Clay | last post by:
We are having some troubles with corrupt indexes on our SQL 2000 dbase. It is only affecting 2 tables out of about 150 we have. These 2 tables are heavily used. We have run dbcc repairs;...
0
by: Guy Deprez | last post by:
Hi, i'm having a problem to create indexes. STEP 1 ----------- Connection is OK (you can find the string at the end of the message) Table ("Couleurs") creation is OK STEP 2. Index Creation
3
by: charley | last post by:
Hello, The appearance of the page should be for the main image, lpmap.jpg, to be on the bottom, (z-index: 1), with pictures, (image0.jpg - image9.jpg), and accompaning notes to appear on top,...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
24
by: Henrik Steffen | last post by:
hello all, on my master-db-server i'm running postgres 7.4.1, and I have got two slave-servers running postgres 7.4.2 running the following query on the master-server (7.4.1) delivers: ...
14
by: Rich | last post by:
Yes, I need to store some values in an array type collection object that can hold 3 or more parameters per index. I have looked at the collection object, hashtable object and would prefer not to...
85
by: Russ | last post by:
Every Python programmer gets this message occasionally: IndexError: list index out of range The message tells you where the error occurred, but it doesn't tell you what the range and the...
18
by: Dave | last post by:
Guys I am really stuck on this one. Any help or suggestions would be appreciated. We have a large table which seemed to just hit some kind of threshold. They query is somewhat responsive when...
5
by: lightgram | last post by:
Hi I have a problem, which after browsing through Google, seems to be fairly common. However having tried most suggestions I am still getting the problem. I have a menu bar across the top...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.