>>Eric,
>>
>>I have just redone the code and have it working brilliantly now. Thanks very much. I was actually using a combo box rather than a list box and this seemed to cause me a great deal of problems. I now use a list box and it is working good.
>>
>>One more thing that you might be able to help with is:
>>
>>I create a SQL statement such as:
>>
>>SELECT proread.*, usertab.us_desc From proread, usertab where proread.pr_inttype=usertab.us_code and usertab.us_type='IT'
>>
>>and use this as the source for the grid. This is fine, but now I have another field to add to the grid and this also comes from the usertab table, but is only when the us_type field is 'RE'.
>>
>>So, I need to create a SQL statement that will have all of the proread fields and a field from the usertab table based on a join, but with the us_type field being either 'IT' or 'RE'. So there would need to be 2 extra fields in the SQL query that are both the same fiel in the usertab table.
>>
>>Sorry if this is not very clear - I'm still trying to get it all clear in my head!
>>
>>Thanks for all your help!
>>
>>Pete
>
>Something like this:
>
>
>SELECT proread.*, usertab.us_desc AS Desc1, '' AS Desc2 From proread, usertab where proread.pr_inttype=usertab.us_code and usertab.us_type='IT'
>
>UNION
>
>SELECT proread.*, '' AS Desc1, usertab.us_desc AS Desc2 From proread, usertab where proread.pr_inttype=usertab.us_code and usertab.us_type='RE'
>
>
Eric,
You're a star! I never even thought about using a Union, but am sure that this will work.
Thanks,
Pete