| View previous topic :: View next topic |
| Author |
Message |
arfgh General User

Joined: 21 Feb 2010 Posts: 19
|
Posted: Wed Feb 24, 2010 9:16 am Post subject: Check if exist a textbox ? |
|
|
How can i check with basic if a textfiled exists or not ?
thx in advabce |
|
| Back to top |
|
 |
QuazzieEvil Super User

Joined: 17 Jan 2007 Posts: 599 Location: Houston, TX
|
Posted: Wed Feb 24, 2010 10:37 am Post subject: |
|
|
use the hasByName(SomeFieldName) method of the data form.
| Code: | Sub CommandButton_MouseButtonReleased(Event As Object)
Dim Form As Object
Form=Event.Source.Model.Parent
If Form.hasByName("txtFirstName") Then
Msgbox "yes"
Else
MsgBox "No"
End If
End Sub |
_________________ Free Docs @ http://www.baseprogramming.com/resources.html
Book @ lulu.com http://www.lulu.com/content/2455551 |
|
| Back to top |
|
 |
arfgh General User

Joined: 21 Feb 2010 Posts: 19
|
Posted: Wed Feb 24, 2010 10:58 am Post subject: |
|
|
| thx will try it |
|
| Back to top |
|
 |
|