Assuming the textbox is databound to a field in a table, make sure the field in the table is of 'number' type, then when in design mode of the form, set the validation rule as..
This means that the entry MUST be 7 characters, and because the field is numeric, it will only allow valid numbers.
If the textbox is not databound, you'll need to put some code in to validate it.
On the Events tab of the properties window for the textbox, select 'Event Procedure' and then click the '...' button.
In the code window which appears, enter this in the Sub...
Code:
If not isNumeric(TextboxName.value) then
' not a valid number
msgbox("Enter a number jackass")
Exit Sub
Else
' it is a valid number
If TextboxName.value <= 0 then
' its a negative number
msgbox("Enter a positive number jackass")
Exit Sub
Else
' its a number, and its not negative
If len(TextboxName.value & "") < 7 then
' Its not 7 characters
msgbox("Enter a 7 digit number jackass")
Exit Sub
Else
' its a number, its not negative and its 7 characters - SUCCESS!
' Its valid, carry on processing your form, shove it in
' the database, whatever you wanna do
End If
End If
End If
OK thats got more nested IF's than you can shake a big pointy stick at, but it should work