Open a form based on an unbound form

  • Thread starter babyatx13 via AccessMonster.com
  • Start date
B

babyatx13 via AccessMonster.com

I want to open a form based on a name. I have an unbound form with a combo
box that looks up the value I want; this works great for opening reports,
However, I made a form that looks like a report and I need it to open the
same way, using this same unbound form. Therefore I don’t want to code
anything in my unbound form. Obviously the placement of the same code does
not work in a form the way it does in a report.

Report Example:

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "frmAssignedTo", , , , , acDialog
End Sub

Private Sub Report_Close()
DoCmd.Close acForm, "frmAssignedTo"
End Sub

Works great in a report.

Can anyone tell me how to code this for a form to open the same way?

Thanks
KBoard
 
A

Albert D. Kallal

Try removing the acdialog part....I don't think you need it....

just go:

DoCmd.OpenForm "frmAssignedTo"
 
B

babyatx13 via AccessMonster.com

Did not wor :blush:(
I think I have to open the unbound form before the other form for this to
work just not sure how to code this.

K Board
 
B

babyatx13 via AccessMonster.com

I broke down and copied my unbound form and did a click event for it to open
my other form.
this works.
Thanks anyway
K Board
 

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