Cannot open a form using "Docmd Openform"

P

PAC

I cannot seem to solve what should be a simple problem here using this command.

I have a listbox that I have setup using the DoCmd Openform to open a
support form that will allow me to enter /change data on this other form. The
ultimate result will be to open the form and filter it using the listbox data
to filter to the specific record, but right now, I cannot get the form to
even open at all. I am using this kind of technique on other forms and have
no problem getting the form to open with the data in tow. Yes, checked the
name of the form and it is correct. But for now, I cannot get the form to
open when I double lick on the box. Other listboxes work just fine with no
problems....this one just will not open!

The listbox uses the Event "On DblClick" to open the form and for now, I've
reduced the code to the bare minimum of:

stDocName = "frmCIPP_Log"
DoCmd.OpenForm stDocName

to just get the form to open and even this simple format does not work. I've
added a command button to the form using the exact same code and that command
button will open the form as expected.

What the heck am I missing here?????
 
D

Damon Heron

It should work as you expect, but here are some things to try. First,
compile. then check the names of your listbox and click event to make sure
they are the same. Next, add a breakpoint at the dbl-click event and see if
the event is fired. If not, it could be due to a disconnect caused by a
name change of the control, in which case, you just restate the dblclick
event and compile.

Damon
 

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

Similar Threads


Top