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

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
 
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

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.
 
Joined
Jun 29, 2007
Messages
3
Reaction score
0
The day has come - thanks Nick - this one was fast becoming a complete mystery to me.
 

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