List Box issue

arindamarindam Member Posts: 176
Hi All,

I am having a problem with lookup forms. The senario :

I have a list type form which contains 3 feilds. Customer Id, Customer name and ship to address code from 'Ship-to Address' table.

When user will select a customer then corresponding customer name will automatically populated to the next grid/cell. When the user will click on the lookup window of the Ship to Address cell then a pop up will open with 'Ship-to Address List' form. Upon selecting a record it will update the cell with the ship to address code.

Everything is working fine except I am getting a message 'Do you want to rename the record ?'. This is occuring due to 'Ship-to Address' code.

My table structure for the form is

Enabled Field No. Field Name Data Type Length Description
Yes 1 No. Code 20
Yes 2 Name Text 30
Yes 3 Code Code 10
Yes 4 Misc Text 30

where primary key is (No. and code) feild.

Also I want to filter ship to address list box according to the selected customer record.

Please advice.

Thanks in advance.


  • DatapacDatapac Member Posts: 97
    Hi Arindam,
    Are you running a CurrForm.UPDATE anywhere? If so, I think you need to change it to CurrForm.UPDATE(FALSE).

    Also, try swapping the order of Customer Name and Ship to code columns around. I think if you tab from the Customer Id field you'll get the problem currently but if you select the Ship to Code column with your mouse instead of tabbing it may work. The issue here may be your primary key allows a blank Ship to address code and the record is inserted after you validate the Customer No.

    Hope this helps,
  • arindamarindam Member Posts: 176
    Hi Richie,

    Thanks for your comment. I am not using Currform.update anywhere. I also tried with the swapping of the feilds but result is the same. I think you are right, the problem is with the primary key of Ship-to address feild.

    Any other way to handle this ?

  • arindamarindam Member Posts: 176
    Just got the solution.

    As I told the primary key of the table is composit of Customer No and Ship to address code.

    I just changed the order of the grid and it worked. Previously it was Customer No., Customer Name, Code and Misc feild. Now I made the order like
    Customer No., Code , Customer Name and Misc feild.

    Thanks for your help.
Sign In or Register to comment.