Are you trying to do this retroactively, i.e. you have existing Records and you want to assign these values in the Text Field if the Numerical Field has Values? If so, an Update Query is, indeed, the way to go.
If, however, you want the Text Field populated if/when a Value is entered in the Numerical Field, something in the Numerical Field Control's AfterUpdate event would be in order.
Code:
Private Sub SizeField_AfterUpdate()
Select Case Me.SizeField
Case Is = 1, 3
Me.TextField = "c"
Case 5 To 10
Me.TextField = "p"
Case Is > 10
Me.TextField = "t"
Case Else
Me.TextField = Null
End Select
End Sub
You haven't given specific details on the relationships between the numbers and letters, so I've given you a couple of different ways to program that.
If SizeField is 1 or 3, then the TextField is 'c'
If SizeField is anywhere from 5 to 10, then the TextField is 'p'
If SizeField is greater than 10 then the TextField is 't'
If SizeField is anything not covered, above, such as 2, or if a number had been entered and then was deleted, then the TextField is 'Null' or empty.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007