Close Form Parameter Prompt

G

Guest

I have a form loaded from code like: DoCmd.OpenForm "frmWebEvent",
whereCondition:="zeid = [forms]![frmSwitchboard]![lstWebEvent]"

All the functionality on the form works fine.

Form opens, has subforms, lists, combo boxes, etc. When I close the form
using a button (docmd.close), I get a parameter prompt of: Enter parameter
query for forms!frmWebEvent!zeid

But, if I use the windows close x box, I don't get the prompt. There's
nothing behind the close command to do anything - just close the form. If I
hit cancel, everything closes fine.

Anybody know what causes it or how I can get rid of it?
 
G

Guest

Thanks Ofer - but no luck. Same thing. So strange. Any way to over-ride
it? All other functioning on the form is fine...

jb


Ofer said:
Try and use the full close command

docmd.Close acForm,"FormName"
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



janetb said:
I have a form loaded from code like: DoCmd.OpenForm "frmWebEvent",
whereCondition:="zeid = [forms]![frmSwitchboard]![lstWebEvent]"

All the functionality on the form works fine.

Form opens, has subforms, lists, combo boxes, etc. When I close the form
using a button (docmd.close), I get a parameter prompt of: Enter parameter
query for forms!frmWebEvent!zeid

But, if I use the windows close x box, I don't get the prompt. There's
nothing behind the close command to do anything - just close the form. If I
hit cancel, everything closes fine.

Anybody know what causes it or how I can get rid of it?
 
G

Guest

I'm not sure about the Open form command line.

Try this, if you try to open the form from the frmSwitchboard form
If zeid is number
DoCmd.OpenForm "frmWebEvent", ,, "zeid = " & Me.[lstWebEvent]

If zeid is string
DoCmd.OpenForm "frmWebEvent", ,, "zeid = '" & Me.[lstWebEvent] & "'"
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



janetb said:
Thanks Ofer - but no luck. Same thing. So strange. Any way to over-ride
it? All other functioning on the form is fine...

jb


Ofer said:
Try and use the full close command

docmd.Close acForm,"FormName"
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



janetb said:
I have a form loaded from code like: DoCmd.OpenForm "frmWebEvent",
whereCondition:="zeid = [forms]![frmSwitchboard]![lstWebEvent]"

All the functionality on the form works fine.

Form opens, has subforms, lists, combo boxes, etc. When I close the form
using a button (docmd.close), I get a parameter prompt of: Enter parameter
query for forms!frmWebEvent!zeid

But, if I use the windows close x box, I don't get the prompt. There's
nothing behind the close command to do anything - just close the form. If I
hit cancel, everything closes fine.

Anybody know what causes it or how I can get rid of it?
 
G

Guest

Ofer,
Thanks so much for taking the time to reply. Unfortunately, same thing
(that was the code I had, but just to be sure, I copy/pasted.)

Janet

Ofer said:
I'm not sure about the Open form command line.

Try this, if you try to open the form from the frmSwitchboard form
If zeid is number
DoCmd.OpenForm "frmWebEvent", ,, "zeid = " & Me.[lstWebEvent]

If zeid is string
DoCmd.OpenForm "frmWebEvent", ,, "zeid = '" & Me.[lstWebEvent] & "'"
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



janetb said:
Thanks Ofer - but no luck. Same thing. So strange. Any way to over-ride
it? All other functioning on the form is fine...

jb


Ofer said:
Try and use the full close command

docmd.Close acForm,"FormName"
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



:

I have a form loaded from code like: DoCmd.OpenForm "frmWebEvent",
whereCondition:="zeid = [forms]![frmSwitchboard]![lstWebEvent]"

All the functionality on the form works fine.

Form opens, has subforms, lists, combo boxes, etc. When I close the form
using a button (docmd.close), I get a parameter prompt of: Enter parameter
query for forms!frmWebEvent!zeid

But, if I use the windows close x box, I don't get the prompt. There's
nothing behind the close command to do anything - just close the form. If I
hit cancel, everything closes fine.

Anybody know what causes it or how I can get rid of it?
 

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