edit your form, click on unitID textbox. on it's property, Default Value:
=CStr(Val(Nz(DMax("[UnitID]","[tblUnits]"),"0"))+1)
by the way, i would suggest changing your UnitID field in your table to numeric long. if you changed it to numeric the code is:
=Nz(DMax("[UnitID]","[tblUnits]"),0)+1