Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DBLookupComboBox

132 views
Skip to first unread message

Kam Patel

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to
Does anyone know how I can set the value of the Datafield and have it
update the EditBox in the DBLookupComboBox.

Example:

Data Table: Cars
DataField: Model ID
LookupTable: Models
LookupField: Model ID
LookupListField: Model Name

From my DBLookupCombobox I use a popmenu to add or edit Models Table in a
Dialog Box.
When the user edits a record in the Models Table from the popmenu of the
DBLookupComboBox Control and save it and exist the dialogbox the
DBControlBox does not update the edit box with the new Name. When I pull
down the list I can see the editting model Name but it doesn't update the
EditText box in the control. Does anyone have any suggestions. The only
way it works if I select another item on the list and then reselect the one
I want. Which won't work for my users.

Any help would be appreciated. Seems simple, but just not getting it to
work. I've tried numerous things but to no sucess.

Thanks,

kam Patel

gerard patel

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to

I take it that your lookup component is linked to a field of
your database, right ? If so, all you have to do I think is :
- refresh the lookup dataset to include the new record
- modify the main dataset for the field linked to the
lookup
Did you try something like that already?
Gerard


Mark Cashman

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to
You have to set the Text property of the DBLookupCombo.

--
------
Mark Cashman, creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, and more -
C++ Builder Tips and The C++ Builder Programmer's Webring (Join us!)
http://www.temporaldoorway.com/progwork.htm
------

Kam Patel

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to
Yes I did try that and it didn't work.

What I tried is make it drop down first. Set a value to 0, then set the
real value and then close the drop down. It is seems to work that way but
that see round about way.

Thanks for your input. I thought if I change the Keyvalue property it
would work but it doesn't refresh the display. It does change the physical
record but not the display.


Kam Patel

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to
Thanks for your input. I will give it a try but what I want was to change
the datafield value and then it should automatic lookup the new display
text and show the changed value on the screen. It doesn't seem to lookup
correctly.

I'm using BCB 1.0 still, so maybe it was fixed in 3.0.

Thanks,
Kam


gerard patel

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to

<snip>
Sorry but I checked in one of my programs and I did
that and it worked :

-add the new record in the list dataset
-set the list dataset active property to false
-set it to true
-set the field in the main dataset (after an Edit of course)
I did not have to drop down the list. In fact the users
usually enter the data directly in the combo without
opening the list.
Gerard


0 new messages