DBLookupComboBox question



I'm sure this has been asked multiple times, but I couldn't find any
answers when I searched. Maybe I didn't use the right keywords...

I'm trying to use a DBLookupComboBox for the following problem, but it
doesn't seem to be working. I'm not sure if the DBLookupComboBox is the
right component to be using, or if I'm just confused about how to use
it.

I have two tables. I want the box to display a list of names from one
table. I want to select a name, and have the ID that goes with that
name be saved into the second table. In effect, I'm saving a foreign
key, but selecting a meaningful name from a list.

For the sake of example, the table I'm reading from is table1, and the
table I'm saving to is table2

I tried this:
Datasource -> dsTable2
DataField -> recordID
ListSourse -> dsTable1
ListField -> recordName
keyField -> recID (from table1)

The behavior I see is the combobox is populated properly, but when I
select something, the edit part doesn't display anything. Table1 is
active (as evidenced by the list being correct), and table2 is in edit
state, so it should show up.

Now, I'm guessing it has something to do with the fact that I'm saving
to an integer field (the recordID), so it doesn't know what to display.
I would rather not put a name field into table2 since it's not needed
and could cause confusion in the future.

Am I misunderstanding how to use the lookup component, or is there no
component that does what I want? (btw, I have some of the Raize and
devExpress components, but I'm not as familiar with them.)

-Corinna

.



Relevant Pages

  • Re: Query a Column of Data to a Field NAME
    ... I need to be able to query where the data in Table1 = The Field Name ... in Table2 to return the data in Table2 ... Create a query in design view then switch to SQL view and enter this union ... select RecordID, "Mth1" as RecordMonth, Mth1 FROM table2 ...
    (microsoft.public.access.queries)
  • Re: One-To-Many Example
    ... Table2: ... Table3: ... rows of information in the listview. ... display it in the fields on my form. ...
    (microsoft.public.dotnet.languages.csharp)
  • How to populate a field in gridview with data FROM ANOTHER TABLE?
    ... Now, I display TABLE2 in a gridview and add, say, a calculated column named ... I'd like the logic for the calculated field to be as ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Slow opening with "track changes" on
    ... You could try saving with the display of balloons set to ... This reply is posted in the Newsgroup; ...
    (microsoft.public.word.docmanagement)
  • Re: document map
    ... "oldLearner57" wrote in message ... how can I prevent the Document Map task pane from being display whenever I ... I tried saving a new blank document as Normal.dot but it is of no ...
    (microsoft.public.word.docmanagement)