Ok I have a form with the following fields:
cboDesc1 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo1 = Text Field
cboDesc2 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo2 = Text Field
cboDesc3 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo3 = Text Field
cboDesc4 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo4 = Text Field
I then have the following code:
I get an Invalid Use of Null when there is nothing in the txtMemo field....
What is it I am doing wrong.....
A blank text field should be blank not null....
cboDesc1 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo1 = Text Field
cboDesc2 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo2 = Text Field
cboDesc3 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo3 = Text Field
cboDesc4 = Combo Box (Contains 3 columns to be referenced : 1 Visible and 2 hidden)
txtMemo4 = Text Field
I then have the following code:
Code:
Public Sub SaveLineItems()
Dim iLine AS Integer
Dim iMaxLines AS Integer
iMaxLines = 4
iLine = 1
Do While iLine <= iMaxLines
MsgBox Me.Controls("cboDesc" & iLine)
MsgBox Len(Trim(Me.Controls("txtMemo" & iLine)))
iLine = iLine + 1
Loop
End Sub
I get an Invalid Use of Null when there is nothing in the txtMemo field....
What is it I am doing wrong.....
A blank text field should be blank not null....
Last edited: