Not in list event

G

Guest

Dear Friends,

I have an unbound form (FormB) whch is opened by the "Not in List" event of
a combo box belonging to an already open form (FormA).

The problem I face is that the code in Not in List event continues to run
disregarding the newly open form. I noticed it after I put a breakpoint
inside the event code. It seems that the code inside the event continues to
run after it goes over "docmd.openform FormB" line without waiting for user
input in FormB.

I need to collect the values from the controls of FormB and pass them to
some Public variables which are already declared in FormA module and because
the code does not wait for user input in FormB I cannot get these values.

Can anyone help?

Thanks in advance.
Catalin
 
G

Guest

Dear Jeff,

I tried to open the form with acDialog but I got the same wrong result.


Catalin
 
L

Linq Adams via AccessMonster.com

Opening the second form in Dialog mode really should have halted further
processing the the first form until the second was closed. What exactly does
"I got the same wrong result" mean? Does it mean you're still not getting the
values you want in the variables? How are you passing info from Form2 to the
variables in Form1? Having Public variables in Form1 means that they're
available to any procedure in Form1, not that they're available to any
procedure in the database. Normally passing variables from one form to
another would be done by having public variables declared in a standard
module, rather than in a form's code module.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
G

Guest

Well, I am sorry guys. Seems that was my mistake.

Opening the form in dialog mode is actually the answer to my problem.

Thanks very much for your assistance. I appreciate.

Catalin
 

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