Jump to content

Recommended Posts

Posted (edited)

Boas pessoal,

Tenho uma maskedtextbox e defini com os traços de modo ao utilizador preenche-la como código postal, e agora de defini-a como campo obrigatório, mas o programa nao me está a reconhecer que ela está vazia, tenho tb uma maskedtextbox para o telefone e o programa ja me reconhece que está vazia, como posso resolver esta questao do codigo postal??



If  MTBCodigo.Text = "" And MTBTelemovel.Text = "" Then

		MsgBox("Campos de Preenchimento Obrigatório")

	ElseIf MTBCodigo.Text = "" Then
		MsgBox("Campo Código Postal em Falta")

	ElseIf MTBTelemovel.Text = "" Then
		MsgBox("Campo Telef/Telem em Falta")
end if
Edited by Whiteangel
Posted

Boas, numa caixa de texto, queria formatar a data (em vba, mas o processo deve funcionar), e resolvi assim:

no evento KeyPress

If Len(Me.datainf) = 2 Or Len(Me.datainf) = 5 Then
Me.datainf.Text = Me.datainf.Text & "-"
SendKeys "{END}", True
End If
Me.datainf.MaxLength = 10 'DEFINE O NUMEROS DE CARACTERES NO TEXTBOX

Pode ser que ajude.

Boa sorte

Férias! Estou por aqui: http://maps.google.p...001549&t=h&z=20 (a bulir claro está!)

Nunca mais é verão outra vez.. :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.