Auto Fill Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Okay, here goes...

I need to have a combo box automatically fill in once info has been input
into the box above it. The first box is called RLLNumber. I enter my data
in the format RLL-123. Once the RLL-123 has been entered, I need for the
RLLTitle to fill in. I also need the RLLTitle to show up in my table.

Right now, I am trying to code this to run from a query called RLL/Title,
but I don't know too much about coding. I've been reading other posts, and
what I've tried typing in to my Control Source field looks like:
=[LookedUpValue]=DLookUp("'RLLTitle'","RLL/Title","'[RLLNumber]= &
Me.RLL.Value '")

My Row Source Type is Table/Query, and my Row Source is RLL/Title Query.

This isn't working.

Any suggestions?
 
Okay, here goes...

I need to have a combo box automatically fill in once info has been input
into the box above it. The first box is called RLLNumber. I enter my data
in the format RLL-123. Once the RLL-123 has been entered, I need for the
RLLTitle to fill in. I also need the RLLTitle to show up in my table.

Ummm...

No. You don't need to store RLLTitle redundantly. Store the RLLNumber
ONLY. Use a Query to look it up when it's needed on a report or
elsewhere.

You can *display* the RLLTitle on your form, but there is no need to
go all around the barn to do so. Rather than typing the RLLNumber in a
textbox and then somehow populating a combo box, use a Combo Box
containing both the RLLNumber and Title fields; *select* the RLLNumber
from the combo, and have a textbox under it with a ControlSource of

=cboRLLNumber.Column(1)

where cboRLLNumber is the name of the combo box, and (1) means the
second column - it's zero based.


John W. Vinson[MVP]
 
Thank you so much - it's working great. But, for some reason it's not
updating to my table. Any thoughts?
 
Thank you so much - it's working great. But, for some reason it's not
updating to my table. Any thoughts?

Yes: the thought I posted previously.
Relational databases use the "Grandmother's Pantry Principle" - "a
place - ONE place! - for everything, everything in its place". Storing
the RLLTitle in a second table wastes disk space (trivial I know) but
far more importantly, risks data validity errors. If you change the
title in one table it will then be stored in your other table, AND IT
WILL BE INCORRECT.

It is NOT necessary to store the title in your second table. Use a
Query linking the tables if you want to see the title.

John W. Vinson[MVP]
 
How would I go about making this information show up in a query or report?
It doesn't want to cooperate with me...

I would appreciate any suggestions.

Thank you.
 
Back
Top