K
Karen
I have a form I use to enter new production requirements in to a
table. On that form I have a the following controls
Code
Qty Needed
Date Needed
Plan Date
The Code control has the following VBA on the On Exit event:
Private Sub fldcode_Exit(Cancel As Integer)
Dim varrtgno As String
Dim vardays As Double
Dim varfstop As Date
Dim varplandate As Date
varrtgno = DLookup("[rtg_no]", "dbo_imitmidx_sql", "[item_no]='" &
[Forms]![frm enter fillroom requirements]![fldcode] & "'")
'Me!rtgno = varrtgno
Select Case varrtgno
' some cases in here
End Select
'some if statements here
Me!fldplandate = DateAdd("ww", 4, Date)
varplandate = DateAdd("ww", 4, Date)
End If
End Sub
I want to put a button to close the form but when I do, I get an error
94, Invalid use of Null. I know the field Code is null.
So what should I do to close the form without seeing the error?
Karen S
table. On that form I have a the following controls
Code
Qty Needed
Date Needed
Plan Date
The Code control has the following VBA on the On Exit event:
Private Sub fldcode_Exit(Cancel As Integer)
Dim varrtgno As String
Dim vardays As Double
Dim varfstop As Date
Dim varplandate As Date
varrtgno = DLookup("[rtg_no]", "dbo_imitmidx_sql", "[item_no]='" &
[Forms]![frm enter fillroom requirements]![fldcode] & "'")
'Me!rtgno = varrtgno
Select Case varrtgno
' some cases in here
End Select
'some if statements here
Me!fldplandate = DateAdd("ww", 4, Date)
varplandate = DateAdd("ww", 4, Date)
End If
End Sub
I want to put a button to close the form but when I do, I get an error
94, Invalid use of Null. I know the field Code is null.
So what should I do to close the form without seeing the error?
Karen S