=> Open Subform on Main Form initiated by button on Main Form

R

Rhonda Fischer

Hello,

I have a main form: frmSupplierOrdersViewGtr1PM
on which the user can either determine a date range
or select button All. At which point a subform appears
on the main form. I don't know how to do this. The
DoCmd.OpenForm simply just opens a new form not an
embedded form in Main?

--------------------------------------------------------
From command btn: ALL
DoCmd.OpenForm "frmSupplierOrdersViewGtr1PM", acNormal,
qrySupplierOrdersGtr1PM
ErrMsg: Form opens independently of Main
ErrMsg: Fields linked to Query has #name?
---------------------------------------------------------
From on_update Event on dateTo:
DoCmd.OpenForm "frmSupplierOrdersViewGtr1PM", acNormal,
qrySupplierOrdersGtr1PM, OrderReceived.OrderDateReceived
& " >= [Forms]![frmSupplierOrdersReportTesco]!
[txtFromGtr1PM]" And OrderReceived.OrderDateReceived & "
<= [Forms]![frmSupplierOrdersReportTesco]![txtToGtr1PM]"
ErrMsg: Runtime Error #424 Object Required
---------------------------------------------------------

Do you have any suggestions that might help me.

Thank you kindly
Rhonda
 
P

Pavel Romashkin

I think all you need to do is change the Visible attribute of the subform.

Pavel
 

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