Recent

Author Topic: [SOLVED] JVCLLaz - JvDBLookUpCombo?  (Read 721 times)

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 400
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
[SOLVED] JVCLLaz - JvDBLookUpCombo?
« on: October 11, 2024, 09:57:33 pm »
Anyone familiar with this set of components, esp. JvDBLookUpCombo.   It's similar to DBLookUpCombo with the exception that you can lookup a value from several columns instead of one.  It works great for looking up states, countries, job type, status, etc.  But I have a couple of forms in which I use JvDBLookUpCombo to look up a contact for a client.  One to many relationship Client to Contacts.  Works but if you move to a different client via the Navigator or just scrolling with your mouse wheel, the contact last name disappears. It's just on these that have a relation set. I have the JvDblookupCombo lookup the contact that shows 3 columns: Last Name, First Name and Mi.  When the user selects a contact, the last name shows in the component and I'm updating 2 DBEdits with the First Name and Mi. If you navigate or scroll and come back the last name is blanked out

I think it must be something I'm doing because I can't find anything similar to this issue searching on the forum.
« Last Edit: October 13, 2024, 06:12:25 pm by 1HuntnMan »

wp

  • Hero Member
  • *****
  • Posts: 13228
Re: JVCLLaz - JvDBLookUpCombo?
« Reply #1 on: October 12, 2024, 12:54:35 am »
Sorry, I think you must take the time to write a small test application which demonstrates the issue. Upload the code (.lpi, lpr, lfm, pas and database file(s)) here unter "Attachment and other options".

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 400
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: JVCLLaz - JvDBLookUpCombo?
« Reply #2 on: October 12, 2024, 09:13:01 pm »
Well, not an issue WP.  I just figured out that this weird behavior only occurs when I'm testing and running the app. within Lazarus, F9.  I finished up some other finals things earlier today and just ran the app directly without Lazarus even launched.  And no disappearing act going on with any of the JvDBLookUpCombo's.  So, whatever, not concerned about this anymore.
Here's the code from the On Change event of the JvDBLookUpCombo component, FYI:
Code: Pascal  [Select][+][-]
  1. procedure TFrmSalesOrdersMgt.JvDBLukUpCmboReqByChange(Sender: TObject);
  2. begin
  3.   DbfSO.FieldByName('REQBYFNAME').AsString:=
  4.    DbfContacts.FieldByName('CNTKFNAME').AsString;
  5.   DbfSO.FieldByName('REQBYMI').AsString:=
  6.    DbfContacts.FieldByName('CNTKMI').AsString;
  7.   DbfSO.FieldByName('TITLE').AsString:=
  8.    DbfContacts.FieldByName('CNTKTITLE').AsString;
  9.   DbfSO.FieldByName('REQBYCELL').AsString:=
  10.    DbfContacts.FieldByName('CNTK_CELLNO').AsString;
  11.   DbfSO.FieldByName('REQBYEMAIL').AsString:=
  12.    DbfContacts.FieldByName('CNTKEMAIL').AsString;
  13. end;
  14.  

Thanks ...

 

TinyPortal © 2005-2018