Display fields selected in a Lookup

I use this code on a lookup, combining 2 tables
I need to select the 4 fields, but only want to display the “poid” and “podetailid” fields together in the following format in the drop down

999999 - 99999999

It now selects the correct records but is displaying “locationid”
How is this changed?

SELECT
tblPOHeader.POStatus,
tblPOHeader.locationid,
tblPOHeader.poid
tblPODetail.podetailid
FROM
tblPOHeader RIGHT OUTER JOIN tblPODetail ON tblPOHeader.poid = tblPODetail.poid

Move the field to field not shown

I’m sorry, I am not sure I understand

What are you try to do exactly, normally don’t select fields that you don’t want to display
If you do need the field for other reason, then move it in the field not show in field configuration

Sorry, I mean in the lookup section.

I have a a lookup in a field on a form. I need to retrieve several fields, but I want 1 specific field to be displayed, and I want another of the fields to be displayed. How do I specify which of the fields is displayed in the drop down?

I don’t really understand where you have a problem, you don’t need to retrieve all the field
Only the one in the SELECT section will be display
The other field for the JOIN or the WHERE don’t have to be in the SELECT

You can have a Select with just one field and it will be used as value to be both saved and displayed. Or with two fields and the first one will be saved and the second one will be shown.
If you need to use the output of more than one field as one of the above, use the concat function of your db.

Example with mysql:
Select field1, concat(field2, " - ", field3) from …

The value of field1 will be saved and the concatenated output of the other two fields will be shown.

Got it, thats what I was missing,
TY