mirror data from subform to main form

Joined
May 14, 2013
Messages
3
Reaction score
0
Hello,

In my main form I have 2 objects:

- (top) one unbound textbox named BigCell.
- (bottom) one subform with lots of long data.

When the cursor moves around in the subform, the data needs to be mirrored to BigCell. This is similar to split form but instead of having all fields in the main form, I just want one big box showing each field. I'm actually trying to make BigCell look like the formula bar in Excel for my novice Access users.

Thanks everyone.
 
Joined
Feb 20, 2010
Messages
12
Reaction score
0
You could use the On Enter or On Focus for each field and add the code:

me.parent!BigCell = Nz(YourCtl,"")
 
Joined
May 14, 2013
Messages
3
Reaction score
0
billmeye, thanks for the tip. Each field is now showing up in BigCell. However, since BigCell is unbounded, any data update I make in BigCell is not saved in each field. Perhaps I need some code under BigCell AfterUpdate?
 
Joined
Feb 20, 2010
Messages
12
Reaction score
0
If you would like to use BigCell for data entry, you need to know which field you currently are viewing. If you create another unbound text box on your main form, say CurField and it could be hidden, you can use this to assign the field name from your subform at the same time you are filling in BigCell:

me.parent!BigCell = Nz(YourCtl,"")
me.parent!CurField = "YourCtlName"

Then, I would create a button on the main form that says UPDATE and in the On Click you can change the value on your subform:

forms(subformName)(CurField) = Me.BigCell

I don't think I would use the After Update event since the user would have to move the focus off of BigCell in order to fire the event and that could be confusing.
 

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