Yes, the formula you quote is correct.

I = E / R, so 10 / 45 = 0.222 amps.

That's for a DC circuit or an AC circuit which is purely resistive. If an AC contains inductance or capacitance, then it gets a little more complex.