how do I create a mouseless combo box?

chuckgoss

Registered User.
Local time
Today, 18:35
Joined
Mar 26, 2001
Messages
44
I’m trying to get a combo box to operate a query without using a mouse. Now for a little background of what I’m trying to do.

I have written a program that tracks part numbers in an inventory. Some are on a shelf, and some are at a location off-site. The program keeps track of how many are where. Each record on my table has a unique index number assigned to it. When a part is transferred from one location to another, I use the SetValue command to copy the record’s index number to another field within the same record on the same table, and then the entire record is duplicated and pasted to the end of the table where it gets a new index number, gets assigned a new location, but carries the ‘associated index number’ of it’s “parent” record along with it. When the part is to be returned to it’s original location, the record showing the off-site location is brought up by means of the 1st combo box on a form. From there, I use the SetValue command to put the value of the record’s ‘associated index number’ into a 2nd combo box on the form so that a query can be run there using that number, where it will call up the original ‘parent’ record on the form. Once done, I shift data around and do some math, getting the original record to reflect the updated quantity of parts at that location. The whole thing works great but the 2nd combo box requires the use of a mouse to activate the 2nd query. I have tried the following and some variations of it with no success to get it to requery and bring up the original record.

Me!IndexSearch.Dropdown
Me![IndexSearch] = Me![Associated Index #]
DoCmd.RunCommand acCmdSelectRecord
Me![IndexSearch].Requery

My goal is to have the 2nd combo box requery on the fly, be automated and mouseless. Any ideas?

Thanks in advance

chuck
 
I fear that I do not entirely understand your procedure, but I suggest that you use the AfterUpdate event of this combo box:
You can trigger this event at any moment with "Call IndexSearch_AfterUpdate()".
 

Users who are viewing this thread

Back
Top Bottom