I am trying to create a new maximum number for a new record I am creating. It consists of three numbers plus the unique new identifier.
The first number can be one of 15 values, as can the second and third numbers. Once the user has selected the first three options, I need to create a new unique fourth number to prevent duplicates.
The code I use is working in SQL
SELECT max(a.Req_No)
FROM tbl_Requirements a
where a.Req_Type = forms!frm_Requirements!Req_Type and
a.Req_Area = forms!frm_Requirements!Req_Area and
a.Req_SubArea = forms!frm_Requirements!Req_SubArea;
How can I call that from a form using the "After Update" on the third number? My brain hurts...
I have set it up as a query from the form but does not show the new value in the field box on the form. DoCmd RunSQL cannot be used.