Display first 3 characters in a field

R

Ricoy-Chicago

Using Access XP...
Admin. in the Mrktng dept. is going to track data using marketing codes
where the first 3 characters will be the marketing code and the last two the
current year. For example: ABC06, ABC07, ABC08, etc. however, when the staff
is going to enter the data in a form a drop down MUST show only ACD.

I created a table for the marketing codes information and linked to a field,
etc., etc. I have no problem with any of that. The problem is that when the
staff clicks on the drop down arrow they can see ABC08 instead of only ABC.

I indicated that it does not matter that staff can see ABC08 instead of only
ABCbut Admin. is adamant about it and it has to be only ABC.

I hope this make sense (as a problem to be solved, not the logic behind my
boss).

Thanks for any help.
 
F

fredg

Using Access XP...
Admin. in the Mrktng dept. is going to track data using marketing codes
where the first 3 characters will be the marketing code and the last two the
current year. For example: ABC06, ABC07, ABC08, etc. however, when the staff
is going to enter the data in a form a drop down MUST show only ACD.

I created a table for the marketing codes information and linked to a field,
etc., etc. I have no problem with any of that. The problem is that when the
staff clicks on the drop down arrow they can see ABC08 instead of only ABC.

I indicated that it does not matter that staff can see ABC08 instead of only
ABCbut Admin. is adamant about it and it has to be only ABC.

I hope this make sense (as a problem to be solved, not the logic behind my
boss).

Thanks for any help.

In whatever query you are using as the Combo rowsource, add a new
column:

CodeInfo:Left([FieldName],3)

Then set this column to be the one displayed, not the current column.
 
R

Ricoy-Chicago

Thank you both... that's what I was looking for :)

fredg said:
Using Access XP...
Admin. in the Mrktng dept. is going to track data using marketing codes
where the first 3 characters will be the marketing code and the last two the
current year. For example: ABC06, ABC07, ABC08, etc. however, when the staff
is going to enter the data in a form a drop down MUST show only ACD.

I created a table for the marketing codes information and linked to a field,
etc., etc. I have no problem with any of that. The problem is that when the
staff clicks on the drop down arrow they can see ABC08 instead of only ABC.

I indicated that it does not matter that staff can see ABC08 instead of only
ABCbut Admin. is adamant about it and it has to be only ABC.

I hope this make sense (as a problem to be solved, not the logic behind my
boss).

Thanks for any help.

In whatever query you are using as the Combo rowsource, add a new
column:

CodeInfo:Left([FieldName],3)

Then set this column to be the one displayed, not the current column.
 
B

Bob V

Hi Ricoy, the control source for a text box be something like this
=UCase(Left(Nz(DLookUp("[OwnerLastName]","tblOwnerInfo","[OwnerID] = " &
[tbOwnerID] & ""),""),3))
Regards Bob hope you can use this
 
Top