Display Name of Field from 1 form in an unbound box on another for

Discussion in 'Microsoft Access Form Coding' started by DM - NPS, May 20, 2010.

  1. DM - NPS

    DM - NPS Guest

    I have 2 forms, 1 that is used to enter data and 1 that is a giant number
    pad. If a person double clicks in one of the fields on the data entry form
    it will open the number pad form and they can use the number pad to enter the
    data. This process works great.

    However, I want to have an unbound box at the top of the number pad form
    that shows which field has the focus on the data entry form. Any ideas?

    Thanks in advance.
     
    DM - NPS, May 20, 2010
    #1
    1. Advertisements

  2. Easy.

    Get the name of the field when the user clicks the control.
    If the control name is the same as the field name, that's easy.
    Otherwise you can store the field name in the control's tag.

    Pass the name of the field as OpenArgs to the code that opens the number pad
    form.
    In the Open event of the number pad form, you get the field name from the
    openargs and use it to set the value for the unbound textbox.

    In the double click event:
    DoCmd.OpenForm "frmNumberPad", , , , , , Me.ActiveControl.Name

    Or

    DoCmd.OpenForm "frmNumberPad", , , , , , Me.ActiveControl.Tag



    In the Open event of the number pad form:
    If Not IsNull(Me.OpenArgs) Then
    Me.NameOfUnboundtextBox = Me.OpenArgs
    End If


    Note: replace my object names with your own.

    Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

    "DM - NPS" <> wrote in message
    news:...
    >I have 2 forms, 1 that is used to enter data and 1 that is a giant number
    > pad. If a person double clicks in one of the fields on the data entry
    > form
    > it will open the number pad form and they can use the number pad to enter
    > the
    > data. This process works great.
    >
    > However, I want to have an unbound box at the top of the number pad form
    > that shows which field has the focus on the data entry form. Any ideas?
    >
    > Thanks in advance.
     
    Jeanette Cunningham, May 21, 2010
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. 1

    Default Value for unbound text box and unbound form:

    1, Sep 3, 2003, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    496
  2. Tom
    Replies:
    7
    Views:
    352
    Albert D.Kallal
    May 12, 2005
  3. Guest

    Unbound form/unbound control calculation

    Guest, Sep 30, 2005, in forum: Microsoft Access Form Coding
    Replies:
    2
    Views:
    359
    Guest
    Sep 30, 2005
  4. Guest

    Populate an Unbound Listbox based on an Unbound Combo box

    Guest, May 24, 2007, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    429
    Guest
    May 24, 2007
  5. Larry Linson

    Re: How to create an unbound Subform related to an unbound Text Box

    Larry Linson, Jan 22, 2010, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    967
    Larry Linson
    Jan 22, 2010
Loading...

Share This Page