MS Access VBA - Advanced Tabular Forms

Posted on 2007-08-08
Last Modified: 2013-11-27
I have a tabular form which displays a matrix of values.

Is there any way to reference the dynamically generated form fields? I've created an on-click event and this works for all fields, I'd really like a mechanism for a click on any field to return a row and column identifier.

Question by:advlegals
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    "s there any way to reference the dynamically generated form fields"

    Sorry .... not really sure what you mean or are trying to do?

    LVL 77

    Expert Comment

    Me neither- I can't imagine what you are referring to.
    Can you describe how these fields are getting onto the form.

    Author Comment


    For instance: My tabular form is based upon a table featuring three columns and three rows. Is there any form functionality/referencing mechanism that would return a cell reference for any given cell i.e. clicking on row 3, column 2 would return something like 3,2?

    Thank you.

    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Well ... I guess you could use the AbsolutePosition or CurrentRecord property of the form record source AND some sort of text box labeling scheme (eg txtCol1, txtCol2 ...) ... then display according to that,

    LVL 75

    Accepted Solution

    The OnClick event of each text box would call a function that would display the info.

        Msgbox Me.CurrentRecord & "," & Right(Screen.ActiveControl.Name,1)



    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    email documents from Access database 7 42
    Concatination in Query Problem. 38 46
    IF SQL Statement Access SQL 6 38
    Running Sum Help 31 24
    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now