Hi this is my first post so please be patient.
I have a table which has 3 fields. the first "Ordnumber" is a number the second "Status" is a combo Text field with 3 options (These are "Enquiry","Provisional" and "Booking") the third is "Reference". what I am trying to create is an onupdate event macro in a form that when a selection is made in "Status" the third field which is "Reference" is populated with the first digit of the choice made in the combo box ( so this will be a "E","P" or "B") followed by the number in Orderno.
eg
Orderno Status Reference
12345 Enquiry E12345 (original enquiry)
12345 Booking B12345 (Enquiry changes to a booking)
I tried this code but it always comes up with an error
= Reference: iif([Status]="Enquiry","E"&[Orderno],iif([Status]="Booking","B"&[Orderno],iif([Status]="Provisional","P"&[Orderno])))
any help would be appreciated