John,
I really appreciate the fast reply!
I don't think I know enough about the code builder yet to use it
efficiently, and I don't want you to have to bring me up to speed. I think
all I need is a quick reference guide that will tell me how the language is
used (e.g. "me" means . . ., periods indicate ____, that kind of thing). I've
used SQL before and think I might be getting confused. Can you recommend a
good place to look for more information on the code builder?
The first resource is right on your own computer: open the VBA editor and hit
the F1 key for help. There are also lots of resources at:
Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html
The Access Web resources page:
http://www.mvps.org/access/resources/index.html
A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html
MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials
VBA has a substantial learning curve and will require some study; getting one
of the VBA books in these references, and studying it, will have benefits.
For some quick answers - Me! means "this current form", shortcut for the
specific (and therefore limited) Forms!NameOfMyForm!; periods are delimiters
used to set one thing off from another thing.
More information about my database: I created a 2-column table that contains
the billing code and the description (title: ICD9). I created another table
that has the patient ID and the billing code, because a patient can have any
number of billing codes ascribed to them (title: Diagnosis), and I created a
2-column lookup box for the billing code field that pulls from the ICD9
table. Now I'm trying to create the form for the Diagnosis table and have the
description automatically pulled in after I put in the billing code.
Where are you trying to put the description? Do you just want to *display* it
on the form (good) or *store* it redundantly in another table (not at all
good)? TO display it, you don't need any code at all; instead, put a textbox
on the form with a control source
=comboboxname.Column(n)
where comboboxname is the name of the ICD9 combo box, and (n) is the zero
based index of the field you want to see - (1) to display the second column.
John W. Vinson [MVP]