gnarpeggio
Registered User.
- Local time
- Today, 06:24
- Joined
- Jun 22, 2010
- Messages
- 74
Hello,
I'm trying to write a simple If statement for my form that enables a command button only when a value is entered into the text field.
This is my first guess:
Sub Barcode_AfterUpdate
If Me.Barcode = "" Then
Me.cmdPrintNew.Enabled = False
Else
Me.cmdPrintNew.Enabled = True
Me.Barcode = UCASE (Me.Barcode)
End If
End Sub
Note: The UCASE statement is to ensure the value becomes capitalized every time a value is entered.
Should I set the .Enabled property to No in the Form properties prior to this? Any help would be appreciated!
Thanks!
Matt
I'm trying to write a simple If statement for my form that enables a command button only when a value is entered into the text field.
This is my first guess:
Sub Barcode_AfterUpdate
If Me.Barcode = "" Then
Me.cmdPrintNew.Enabled = False
Else
Me.cmdPrintNew.Enabled = True
Me.Barcode = UCASE (Me.Barcode)
End If
End Sub
Note: The UCASE statement is to ensure the value becomes capitalized every time a value is entered.
Should I set the .Enabled property to No in the Form properties prior to this? Any help would be appreciated!
Thanks!
Matt