Trouble with Event Procudures

sondriven

Registered User.
Local time
Today, 08:02
Joined
Jun 13, 2002
Messages
158
Heres what Ive done so far:

Created a table called Suppliers with basic address fields
Created a form called Suppliers with the same

Both have a Primary Key using Autonumber

What I want to do is like in the template database "Inventory Control", when you go to enter a Category name it tells you to double click it to enter, then another small form pops up and you can add it to the combo box.

I have tried to reproduce everything exactly the way it is in the template but can get it to work. When I enter something into the box, its telling me that what I entered is not in the list, but it wont pop open the form I have designed.

Heres what I put into the field that I want to enter data in:
Row Source Type: Table/Query
Row Source: SELECT DISTINCTROW Suppliers.* FROM Suppliers ORDER BY [Suppliers].[SupplierName];

Shouldnt this line make the Suppliers Form pop up?

Also, for the OnNotInList and DBLclick events, I have only put in there "Event Procedure", Do I need to program the events at all?

Thanks any info would be helpful.

John
 
OK, I'll admit I never looked at the Inventory Control example, but there seems to be a disconnect in what you are saying vs. what Access will do.

Where did you place your event procedures? From your description, it sounds like you tried to place them on a table. Which won't work. Did you perhaps build a form and not tell us about it?

Where are you entering the data that should trigger the pop-up form? In a table datasheet view? No events can occur there!

If, however, what you had was really a form built to look like a datasheet in continuous view, which would look very much like a table, THEN you could put the OnDblClick event routine in the text box to trigger some actions.

Your question confused me, so if I misunderstood, I apologize.
 
Sorry if that was confusing, let me try to clarify..

I have a Purchase Order form and inside that form there is a combo box that when I double click it, I want a secondary form pop up and then I can add any pertanent information. For example:

In the combo boxes there are suppliers, I go to add a new one, then I need to double click the the combo box, then a second form pops up and I can enter the information, and then the name of the supplier is then listed inside the combo box.

So then I have added a new supplier to my suppliers list and also have it in the combo box for future orders.

No, I didnt try to add an event to a table. What am I a rookie??!!

...actually I am.....

Thanks

John
 
So what is the symptom you get when you double-click?

Have you tried putting code breakpoints in your event modules?

Or here is an idea that might be useful. Modify your event routines to include a Debug.Print statement with some unique, brief message. Then before you open your form, open the class module so you can open the local debug window. Now minimize the module window and debug window. Switch to Form View. Use your form. Do whatever it is that leads you to the point where you expected to see something.

Without closing the form, use the Menu-bar (or does this appear in the task bar??? I forget at the moment) to open up the local window. That way you can see which events have fired, and the order in which they fired. You can see whether the code you wanted to run has actually run.
 

Users who are viewing this thread

Back
Top Bottom