PC Review


Reply
Thread Tools Rate Thread

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

 
 
DM - NPS
Guest
Posts: n/a
 
      20th May 2010
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.
 
Reply With Quote
 
 
 
 
Jeanette Cunningham
Guest
Posts: n/a
 
      21st May 2010
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to create an unbound Subform related to an unbound Text Box Larry Linson Microsoft Access Form Coding 0 22nd Jan 2010 10:05 PM
Populate an Unbound Listbox based on an Unbound Combo box =?Utf-8?B?S2ltIEthdXR6bWFubg==?= Microsoft Access Form Coding 1 24th May 2007 09:45 PM
Showing table field in unbound field unbound field georgezx9 via AccessMonster.com Microsoft Access Forms 0 31st May 2006 11:40 PM
Unbound Form controls Unbound Form Gérard Marcillac Microsoft Access Forms 0 28th Jun 2004 04:07 PM
Default Value for unbound text box and unbound form: 1 Microsoft Access Form Coding 0 3rd Sep 2003 02:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:52 PM.