|
-
Feb 2nd, 2000, 06:01 AM
#1
Thread Starter
Lively Member
OK I have been trying to get this for a while. I have tons of textboxes that I want to fill in with "Input" if there are no values from the database to pull into them. Rather than saying if isnull(blahblah) for each txt and then what I want to be filled in I know there is an easier way to just fill in all null txt's. I have been trying the following code but that sucker is not working. Also if the txt's are not Null they are going to be filled with different fields from the table so is that going to make this that much more complicated. Many Thanks to any help.
Dim oObj3 As Object
For Each oObj3 In Me
If TypeOf oObj3 Is TextBox Then
If IsNull(oObj3) = True Then
oObj.Text = "Input"
oObj.ForeColor = vbRed
Else
oObj3.ForeColor = vbBlack
End If
End If
Next
-
Feb 2nd, 2000, 06:12 AM
#2
Addicted Member
Simply append the null string onto your default string:
rs!Value & "Input"
-> this will equal "Input" if the object is null
I use this to avoid using is null for database fields
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|