Validating Textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I´m buildin a simple form from a table that contain two fields, Id and Name.
What a need to do is to put the cursor in the Id field (TextBox) and it
statys there every time the users jump to another record.

In the same textbox need to validate against null or balnk spaces and statys
the crusor there if so.

Thanks in advance
 
In the form's Current event:

Me.ID.SetFocus

And to test it for nulls or blanks
If len(trim(nz(Me.ID,vbNullstring))) = 0 then msgbox "Id is Not Valid"
 
Thanks a lot!
--
César Parrales


Klatuu said:
In the form's Current event:

Me.ID.SetFocus

And to test it for nulls or blanks
If len(trim(nz(Me.ID,vbNullstring))) = 0 then msgbox "Id is Not Valid"
 
Back
Top