Wizard does not create an Event Procedure for find record combo bo

K

KHA Engineer

I've got a MS A 2003 mdb form within which I'd like a pull down to select a
record from a table. After going through the wizard the look-up does not work
and there is no "Event Procedure" created in the after update section...

I've used this in the past with a different installation of Access 2003
without issue..

Thanks in advance!
 
L

Larry Daugherty

It sounds like you might be trying to use the dreaded *LookupField* in
an Access table. You might visit:
www.mvps.org/access
for a discussion as to why you shouldn't.

To achieve the result you seem to be seeking, create a form based on
the table in question. You can use the Wizard to create different
versions of the form until you're close to what you want.

In the header of the form, place a combobox. Answer the Wizard's
questions. You want to go to a specific record.

That should put you well on your way.

HTH
 
K

KHA Engineer

Thanks Larry,

I have the form with the table as it's source and that's (the form) where
I'm trying to use the record find via a combo box, ala the "wizard".

I do have a look-up in the table, and it happens to be the same one I'm
trying to find in my form... not sure if that matters.

Your help is appreciated.
 
L

Larry Daugherty

I thought you might be guided by what you found on

www.mvps.org/access

regarding lookup fields. The simple answer is to get rid of them.
They cause you grief as yours now are.

Go back and design your tables properly (without lookup fields).
Remember that each field must contain one instance of one fact, not
the result of a calculation on any combination of facts in the
database.

HTH
 
P

Paul Shapiro

For the wizard to offer the option of creating the code to lookup a record
based on the value in the combo box, the form's record source has to be just
a table name, not a query or sql, and you have to drop the combo box onto
the form header, not the detail section. But the code is pretty simple so
you could also just copy it from a working form and make the slight
modifications for this particular form.
Paul Shapiro
 
K

KHA Engineer

Thanks again Larry,

I'd love to get rid of the lookups in my tables; however my ignorance is
getting in the way. I can't figure out how to relate the tables otherwise and
the number that they look up is 16 digits so I don't want to input them and
invite the error that would result from mistyping by the user.

I've read about normalizing the table and have made my best attempt at it
but the number common to many of my tables needs to be in multiple tables due
to the prohibitively large number of fields necessary to accomplish my
objective.

I’m so clueless!

Any insight will be appreciated.
 
K

KHA Engineer

Thanks Paul, I posted a reply to Larry with more specifics.

Unfortunately, in a futile effort to "normalize" my tables it was necessary
to base my form on a query rather than a table so that explains why the combo
box find record approach failed... is there any other way?
 
L

Larry Daugherty

I've been away for a few days.

Either "find" on these Access newsgroups or google on them for some
info from John Vinson on this topic. I'd look in the body of the
messages for: Lookup Field

He has a nice succinct process for backing out of lookup fields. I'll
ask him to post in on MVPS for everyone's future reference.

I'm pooped & heading for bed.

HTH
 
Top