MSACCESS accessing field / column name in active datasheet

B

brettn

I can get the selected column index from the displayed datasheet via the
screen.ActiveDatasheet.SelLeft property.

What I cannot seem to work out is how to get the column / field name that
corresponds to that index. It's based on the current view, so if the columns
have been re-ordered the underlying table will have a different column order.

I just need to get the name of the currently selected field column.

Any help appreciated.

Brett
 
C

Cindy M.

Hi =?Utf-8?B?YnJldHRu?=,
I can get the selected column index from the displayed datasheet via the
screen.ActiveDatasheet.SelLeft property.

What I cannot seem to work out is how to get the column / field name that
corresponds to that index. It's based on the current view, so if the columns
have been re-ordered the underlying table will have a different column order.

I just need to get the name of the currently selected field column.
Is this in the Access application, or in some other programming environment?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
B

brettn

Cindy M. said:
Hi =?Utf-8?B?YnJldHRu?=,

Is this in the Access application, or in some other programming environment?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)

The application is an Access plugin written in c# 2005 - I need to get the
name of the currently selected (focused) column from the currently open
datasheet. Thus far, I am using the automation interface to control / refer
to the instalnce of Access.
 
C

Cindy M.

Hi =?Utf-8?B?YnJldHRu?=,
The application is an Access plugin written in c# 2005 - I need to get the
name of the currently selected (focused) column from the currently open
datasheet. Thus far, I am using the automation interface to control / refer
to the instalnce of Access.
OK. The Access specialists tend to congregate in the Access-specific
newsgroups, rather than in this more general group. I'd try asking in that
programming group, as this should be a function of the object model (IOW it
doesn't matter whether you're using C#, VBA or something else).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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