Problem in Form

rana1978

Registered User.
Local time
Tomorrow, 05:11
Joined
Jun 25, 2009
Messages
25
Dear Friends...
Greetings..!!
I have a table (T_I_1) with a field (ChannelID, SIM). A form has been created based on the table. I am trying to do the following but not working-
1. If (in the form) I don’t insert any ChannelID (it is a text field), the curser will not move to the next field and any record will not been created. In the table design required property of Channelid has been mentioned as “Yes”.
2. If the channelID field is blank and Tab is pressed a PopUp (MsgBox) will be appeared as “Channelid has not been inserted”. And the channelid field will be setfocus after cancelling the PopUp.

I have tried as below
Private Sub SIM_GotFocus()
If Me.Channelid = "" Then
MsgBox " You must enter Channel ID ", vbOKCancel, "Data Required"
Me.Channelid.SetFocus
End If
End Sub
But not working
Can anyone help me please guiding me the way.
Reagards
Rana
 
Try:

If Me.Channelid & "" = "" Then
 
Thank you very much. Now it is working well.

I'm really grateful to this forum members. They have provided me a lot of supports. :):)

Rana
 

Users who are viewing this thread

Back
Top Bottom