The initiate value of max is unknown. Assign an value would fix the problem.
int max = 0;
To find max and the next value, you can try
maxCommand.CommandText = ("SELECT acn FROM contacts ORDER BY acn DESC");
SqlDataReader reader = maxCommand.ExecuteReader();
reader.Read();
max = Convert.ToInt32(reader[0]); // the max value
max++;// the next value
acn.Text = max.ToString();