By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

help with form update

P: n/a
Ron
Hi All,

Okay, I've got a frmOrders with a subform of sfrmDetails. A frmClient has
all the client info, plus a subform of sfrmDefaults that has the client's
normal ordering defaults (like set products they always order, just no
quantity).

The frmClient form has a button for adding or modifying orders by popping up
the frmOrders (with it's subform) and everything works well so far. I can
manually input the orders, with details, etc. However, I thought it'd be
cool to allow the user to click on one button on the order screen to ask if
they wanted the defaults, and if so, then it'd automatically add however
many "default" details were in the frmClient, sfrmDefaults form. I
accomplish this by then running an update query from the table from the
sfrmdefaults form to the table for the sfrmOrders. I've got that all done
and working. If I have, say, 4 defaults then it'll add 4 new detail records
to the details table just like I want. HOWEVER...

Since the form is already on the screen, it doesn't show the newly added
details from the update query unless I exit and go back into the same order
(say, to modify it). Clumsy. Is there a way to refresh the subform without
closing it all so that after I do the update query, the subform is filled
with those new details (however many) and the operator can then just start
adding the additional details, if any?

Where is this refresh, or requery or whatever placed so only the subform is
re-displayed?

TIA,
ron
Jan 4 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 04 Jan 2007 23:07:09 GMT, "Ron" <ro********************@verizon.net>
wrote:
>Hi All,

Okay, I've got a frmOrders with a subform of sfrmDetails. A frmClient has
all the client info, plus a subform of sfrmDefaults that has the client's
normal ordering defaults (like set products they always order, just no
quantity).

The frmClient form has a button for adding or modifying orders by popping up
the frmOrders (with it's subform) and everything works well so far. I can
manually input the orders, with details, etc. However, I thought it'd be
cool to allow the user to click on one button on the order screen to ask if
they wanted the defaults, and if so, then it'd automatically add however
many "default" details were in the frmClient, sfrmDefaults form. I
accomplish this by then running an update query from the table from the
sfrmdefaults form to the table for the sfrmOrders. I've got that all done
and working. If I have, say, 4 defaults then it'll add 4 new detail records
to the details table just like I want. HOWEVER...

Since the form is already on the screen, it doesn't show the newly added
details from the update query unless I exit and go back into the same order
(say, to modify it). Clumsy. Is there a way to refresh the subform without
closing it all so that after I do the update query, the subform is filled
with those new details (however many) and the operator can then just start
adding the additional details, if any?

Where is this refresh, or requery or whatever placed so only the subform is
re-displayed?

TIA,
ron

Me.NameOfSubformControl.Form.Requery

Wayne Gillespie
Gosford NSW Australia
Jan 4 '07 #2

P: n/a
Ron
"Wayne Gillespie" <be*****@NOhotmailSPAM.com.auwrote in message
news:9g********************************@4ax.com...
On Thu, 04 Jan 2007 23:07:09 GMT, "Ron"
<ro********************@verizon.net>
wrote:
>>Hi All,

Okay, I've got a frmOrders with a subform of sfrmDetails. A frmClient has
all the client info, plus a subform of sfrmDefaults that has the client's
normal ordering defaults (like set products they always order, just no
quantity).

The frmClient form has a button for adding or modifying orders by popping
up
the frmOrders (with it's subform) and everything works well so far. I can
manually input the orders, with details, etc. However, I thought it'd be
cool to allow the user to click on one button on the order screen to ask
if
they wanted the defaults, and if so, then it'd automatically add however
many "default" details were in the frmClient, sfrmDefaults form. I
accomplish this by then running an update query from the table from the
sfrmdefaults form to the table for the sfrmOrders. I've got that all done
and working. If I have, say, 4 defaults then it'll add 4 new detail
records
to the details table just like I want. HOWEVER...

Since the form is already on the screen, it doesn't show the newly added
details from the update query unless I exit and go back into the same
order
(say, to modify it). Clumsy. Is there a way to refresh the subform
without
closing it all so that after I do the update query, the subform is filled
with those new details (however many) and the operator can then just start
adding the additional details, if any?

Where is this refresh, or requery or whatever placed so only the subform
is
re-displayed?

TIA,
ron


Me.NameOfSubformControl.Form.Requery

Wayne Gillespie
Gosford NSW Australia
Thanks for the quick response.

I placed this in the main form's (frmOrders) On Activate and it seems to
work. I have a bunch of other areas where I wanted to automatically add
some "default" subrecords (if there is such a thing) whenever a new record
is added in a main file, so I'll now be able to play around with those too.

Thanks bunches.
ron
Jan 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.