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
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, 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
------
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.
I'm using BCB 1.0 still, so maybe it was fixed in 3.0.
Thanks,
Kam
<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