Recent

Author Topic: JvDBLookUpCombo disappearing field value  (Read 1700 times)

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 278
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
JvDBLookUpCombo disappearing field value
« on: May 03, 2024, 05:36:47 pm »
Has anyone ran into an issue where with the JvDBLookUpCombo on closeup isn't displaying the value that was looked up? I'm only having this issue on a couple of forms, the rest, not issue.  Basically you can lookup the main contact on my Sales Orders form. It's appears and also I'm updating the phone, first name, middle initial from the contact selected and finishing updating the form fields and posting.  But, if I move to another record and come back to the record that was added, the Contact Last Name isn't displaying in the JvDBLookupCombo. The last name is in the table, but it doesn't display. You can re-lookup but it will not display once to move off that record and come back, it's not displaying???
I've tried refreshing, doesn't react???

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 278
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: JvDBLookUpCombo disappearing field value
« Reply #1 on: July 16, 2024, 10:37:58 pm »
To be more specific, I think this is an issue with the DBGrid.  I have the DBGrid near the top of the form below the DBNAV, Save btn, Cancel btn and the Close btn.  Below the DBGrid is the the main pnl with the record fields for the table(s). I put the DBGrid near the top above the data entry panel so the user can just hover over the DBGrid and scroll up and down thru the table records with roller on the top of their mouse. As you roll the mouse and the records update on the lower panel with the DBLookUpCombo's, DBEdits, etc.  Everything seems to update with all the JvDBLookupCombos, i.e. for State, Country, Status, etc.  The only issue is the JvDBLookup for the Contacts which is a many-to-one relation to the Sales Order record.

Would anyone be able to have an idea why this disappearing Contact Last Name isn't showing? Should I Refresh the lower panel on exit from the Grid?  I'm trying that in these forms early tomorrow.

Any suggestions, greatly appreciated ...

wp

  • Hero Member
  • *****
  • Posts: 12476
Re: JvDBLookUpCombo disappearing field value
« Reply #2 on: July 17, 2024, 10:22:06 am »
Please create a small compilable project which shows the issue. Do not use one of the big database systems for that (I will not install any of them).

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 278
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: JvDBLookUpCombo disappearing field value
« Reply #3 on: July 17, 2024, 08:13:40 pm »
It's a TDbf database app... I'll make a small project example... coming

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 278
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: JvDBLookUpCombo disappearing field value
« Reply #4 on: July 18, 2024, 04:36:06 pm »
WP, can't figure out how to create a project with just one of the units/forms for a demo.  For example I created a new project with Unit 1.  Then added the Appointments mgt. form to the project and included that unit in the .lpr project file. If I look at the Project Units it shows the AppointmentsMgt.lpr, Appmts.pas and the unit1.pas.  If I attempt to compile it, I get an error that it can't find the DBDateTimePicker which is in the uses of the Appmts.pas.

I can send you a form and unit and you can figure out how to make a project lpr from it. Just one form and one unit.

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 278
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: JvDBLookUpCombo disappearing field value
« Reply #5 on: July 18, 2024, 10:58:30 pm »
WP, fixed it good enough with the DBGrid and the DBNav property events to eliminate the disappearing Contact Last Name in the JvDBLookUpCombo.  See below...

Code: Pascal  [Select][+][-]
  1. procedure TFrmAppmts.DBGridAppmtsCellClick(Column: TColumn);
  2. begin
  3.   DbfAppmts.Refresh;
  4.   JvDBLukUpCmboContact.Refresh;
  5. end;
  6.  
  7. procedure TFrmAppmts.DBGridAppmtsEnter(Sender: TObject);
  8. begin
  9.   DbfAppmts.Refresh;
  10.   JvDBLukUpCmboContact.Refresh;
  11. end;
  12.  
  13. procedure TFrmAppmts.DBGridAppmtsExit(Sender: TObject);
  14. begin
  15.   DbfAppmts.Refresh;
  16.   JvDBLukUpCmboContact.Refresh;
  17. end;
  18.  
  19. procedure TFrmAppmts.DBGridAppmtsMouseEnter(Sender: TObject);
  20. begin
  21.   DbfAppmts.Refresh;
  22.   JvDBLukUpCmboContact.Refresh;
  23. end;
  24.  
  25. procedure TFrmAppmts.DBNavAppmtsClick(Sender: TObject; Button: TDBNavButtonType
  26.   );
  27. begin
  28.   DbfAppmts.Refresh;
  29. end;
  30.  

wp

  • Hero Member
  • *****
  • Posts: 12476
Re: JvDBLookUpCombo disappearing field value
« Reply #6 on: July 18, 2024, 11:18:06 pm »
WP, fixed it good enough with the DBGrid and the DBNav property events to eliminate the disappearing Contact Last Name in the JvDBLookUpCombo.
Great!

 

TinyPortal © 2005-2018