Access 2007 - OrdinalPosition

  • Thread starter Michael J. Strickland
  • Start date
M

Michael J. Strickland

Anyone noticed Access 2007 having a problem ordering fields if a field
(column) is deleted in NORMAL view (as opposed to DESIGN view) and then
a field is added using VBA?

To illustrate the problem:

1. Delete the 2nd field of a table in NORMAL view (Rt click column
header-> Delete Column).

2. Close the table.

2. Add a new field (using VBA code), giving it the same OrdinalPosition
value as the 1st field of the table.

3. Open the table.

The new field is incorrectly placed at the end of the table (last
column). In DESIGN view however, it is correctly shown as being adjacent
to the first field.

If you move the field in Design View (drag it to another position), and
then move it back to its original position and close Design View the
situation is corrected. When you now open the table in NORMAL view, the
field is in the correct position (adjacent to the 1st field).

The problem does not occur if, at the start, you use DESIGN view to
delete the 2nd field.

There seems to be some kind of disconnect between DESIGN view and NORMAL
view
processing of the Ordinal Position property.
 
D

Dale Fye

Mike,

I cannot recall a situation where I ever wanted to allow an application user
to remove or add fields to my data structure, through VBA or a table view
(which I never give my users that ability to do).

Can you give me an example of a situation in which you would do this?
 
M

Michael J. Strickland

This form is for my use only. In this particular case, I am creating a
new field to hold a new value related to the original value. I want the
new value adjacent to the old value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top