Sync Columns

G

Guest

I am trying to get the column order in the Design View of a query to match
the order in the Datasheet View. I know how to move columns in each view but
if you move them in Datasheet View, how do you get them synchronized back to
the order in the Design View? Normally, I would move them in the Design View
and the Datasheet View would match. But, if you move them once in the
Datasheet View, then they are out of sync. Any suggestions will be
appreciated.
 
G

Guest

Hi, David.
I know how to move columns in each view but
if you move them in Datasheet View, how do you get them synchronized back to
the order in the Design View?

This is one of those situations where you've made your bed, and now you have
to lie in it. The datasheet's column order is a set of properties that can
only be manipulated through the GUI environment, and the query's column order
is dictated by the Fields Collection of the QueryDef object. Once these two
column orders don't match, the datasheet column order needs to be manually
moved to its new place.

The alternative is to change the name of the query (say, "qryOld"), open the
query in SQL View, copy the SQL statement, create a new query, paste the SQL
statement into the SQL View pane of the new query, and save the new query
with the original name of the query. Delete the original, renamed, query
("qryOld"). The datasheet's columns will now be in sync with the QueryDef's
columns of this new query.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 

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