Full Version: update sub form from main form
UtterAccess Forums > Microsoft® Access > Access Forms
Hi all
On a mainform I have 2 controls: a textbox and a combobox.
The textbox is for a specific date, the combo is for a (in this case) distance.
The date is ALWAYS filled in before the distance.
After the distance is filled in, I would like to add the same information in the sub form.
Ocan't figure out how to use the after update event from the combobox to add an extra record in the subform using this 2 pieces of information.
This may seem rather unneccesary but it is part of something bigger. Once I know how to do this, the rest must be easy (I hope..)
I have added a sample to makes things more clear
Thanks for your input
I would try using an append query, built with VBA code in the event, to add the record. You can then requery the sub form to get the new record to display.
Thanks Boyd for your input,
think I can do this.
However, I thought / hoped there was an alternative way using docmd or something like that.
Last minute thought: the distance combobox is an unbound combobox, only used for later purposes
How can I use these, or in other words, how can I capture this in an append query or does this changes matters?
Thanks Hein
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.