473,608 Members | 2,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 97: Use VBA to find selected column in subform (datasheet view)

I have a form with a subform in datasheet view. Now, I want to trigger a
procedure (P1) each time the user selects an entire column (by clicking in
the heading) in the subform. The procedure (P1) I want to trigger needs to
be called with the selected column as a parameter.

As far as I am aware, there is no event procedure for clicking in the
heading of a datasheet. So insted I need to start by having an other
procedure P0, which is triggered in an other maner (maybe from timer, mouse
move or?). And then I can let P0 test if a column is selected or not. And
then if a solumn is selected, P0 should fin a name (or some other reference)
for the selected column, and the call my procedure P1.

Now, I have no idea how to read from VBA if a column is selected, and also I
have no idea how to find a reference to the selected column. Any ideas?

Thanks in advance

Thomas Zimmermann
Nov 16 '05 #1
1 6983
I'll admit I tried this in Access 2000, but I *think* it would work in A97
as well.

Clicking in a datasheet subform's header seems to trigger the OnClick event.
And in that event Screen.ActiveCo ntrol.Name returns the name of the column
you clicked on.

HTH

"Thomas Zimmermann" <thomas@zinform atik> wrote in message
news:43******** *************** @news.sunsite.d k...
I have a form with a subform in datasheet view. Now, I want to trigger a
procedure (P1) each time the user selects an entire column (by clicking in
the heading) in the subform. The procedure (P1) I want to trigger needs to
be called with the selected column as a parameter.

As far as I am aware, there is no event procedure for clicking in the
heading of a datasheet. So insted I need to start by having an other
procedure P0, which is triggered in an other maner (maybe from timer, mouse move or?). And then I can let P0 test if a column is selected or not. And
then if a solumn is selected, P0 should fin a name (or some other reference) for the selected column, and the call my procedure P1.

Now, I have no idea how to read from VBA if a column is selected, and also I have no idea how to find a reference to the selected column. Any ideas?

Thanks in advance

Thomas Zimmermann

Nov 17 '05 #2

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

Similar topics

2
1771
by: MVM | last post by:
I am working in an Access project (.adp). I have a subform that displays the data in datasheet view. When I am logged onto a computer (Win 2000) with my username, the datasheet has the correct column widths. When I logon to a computer with a different username the datasheet columns are more narrow than what they should be. I have verified this by logging onto multiple computers with my username and having it work correctly, and having...
49
14314
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
14
3091
by: alwayshouston | last post by:
Hi All! I am working on this very small database and I am confused in the designing a simple form. I only have three tables in the database. First Table: tblExpense Columns: ExpenseID ; ExpenseType Data: 1 ; FOOD 2 ; AIRLINE 3 ; FARE
39
3075
by: Marcin Zmyslowski | last post by:
Hello all! I have the following problem with MS Access 2003 permissions. I have two users. One is admin and the second one is user who has full permissions to enter modify and read data. I have one table and one queries which is based on this table. This query is good working for these two users.
4
3267
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The subreport contains 2 fields - a text field where line items sold are listed and a currency field where the price per item is shown. The subreport control displays these two fields when the main report is opened.
4
2651
by: Don Do | last post by:
Help I built a form/subform/subsubform setup using the access forms wizard. I have a table1 = parent, table2 = child, table3 = (grandchild?). There will be multiple records in table2 that tie to table1, and multiple records in table 3 that tie to table2. Both on "1 to many" joins. Each of the forms are bound to the fields in the respective tables. The subform & subsubform are datasheet view. When I enter any data, I
0
3150
by: WPW07 | last post by:
Hello Everyone, I stumbled onto something interesting and was wondering if anyone else has experienced it and how they fixed it. I've posted to several forums to no avail. I've got a datasheet subform developed in an Access 2003 database. Users can click on a row and delete the record on the datasheet. However, when we open the database using Access 2007, Access 2007 sets autofiltering on each column, so I can't select the row--only
0
1278
by: magickarle | last post by:
Hi to all. Little introduction on what I'm trying to do: I'm in charge of creating an access database for our supervisor where they can grade their agents. Per ex: agents are talking to customers and the supervisor is listening to their conversation (and grading them as per a specific template) What I've done so far: Created Tables for the entry of:
5
11023
by: Deano | last post by:
I have five subforms each living in a page on a tab control. Each form is in datasheet view. The time has come to resize both the forms and the subforms. I am able to change the column widths in the first subform and these are remembered. However the column widths for all the other subforms change back to their original widths when I re-enter the form. I have no idea why this is and I have checked that all the form properties are...
0
8063
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8496
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
6013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3962
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4024
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1594
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1329
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.