Trick filter form combo with DoCmd.OpenForm and Data Entry property

  • Thread starter Thread starter DaNick
  • Start date Start date
D

DaNick

I have a form called frmApples that I wanted to be blank when users
open it. So I made the Data Entry = No. All is good.

But I also have another form that when users double click a field, it
will open the frmApples and filter it to a specific record. I am
using the DoCmd.OpenForm to do this.
However, since I have the Data Entry set to No, it still opens with a
blank field.
The form opens to the correct record if I set Data Entry to Yes, but
then it will no longer open with a blank record when the users open it
the other way.

Is there a way to only filter the form sometimes while keeping the
Data Entry set to No?

Thanks
 
I have a form called frmApples that I wanted to be blank when users
open it.  So I made the Data Entry = No.  All is good.

But I also have another form that when users double click a field, it
will open the frmApples and filter it to a specific record.  I am
using the DoCmd.OpenForm to do this.
However, since I have the Data Entry set to No, it still opens with a
blank field.
The form opens to the correct record if I set Data Entry to Yes, but
then it will no longer open with a blank record when the users open it
the other way.

Is there a way to only filter the form sometimes while keeping the
Data Entry set to No?

Thanks

Well after playing around a bit, I found something that seems to be
working.
I just added "acFormEdit" at the end of the open form code. So it
looks something like this:

DoCmd.OpenForm "frmApples", , , "ApplesD=" & Me.[ApplesID], acFormEdit

Hope it helps someone someday.
 
Back
Top