R
rocco
Does anyone know whay this:
Select Case RST.Fields(i).Name
Case "data", "startdate", "endDate"
RST.Fields(i) =
IIf(IsNull(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value),
Null,
ConvertiDataISO(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value))
Case Else
.....
End Select
will always fire an error: invalide use of null on the field enddate, which
can really happen to be NULL
while this:
Select Case RST.Fields(i).Name
Case "data", "startdate", "endDate"
If
IsNull(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value)
Then
RST.Fields(i).Value = Null
Else
RST.Fields(i).Value =
ConvertiDataISO(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value)
End If
Case Else
.....
End Select
works just fine? Didn't both do the same thing?
The table field "enddate" can accept Null values.
I tried importing everything in a new database thinking of some kind of
corruption. But didn't fix it...
There should be something with the IIF function, I guess.
Thanks,
Rocco
Select Case RST.Fields(i).Name
Case "data", "startdate", "endDate"
RST.Fields(i) =
IIf(IsNull(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value),
Null,
ConvertiDataISO(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value))
Case Else
.....
End Select
will always fire an error: invalide use of null on the field enddate, which
can really happen to be NULL
while this:
Select Case RST.Fields(i).Name
Case "data", "startdate", "endDate"
If
IsNull(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value)
Then
RST.Fields(i).Value = Null
Else
RST.Fields(i).Value =
ConvertiDataISO(Forms(ff.Name).Section(acDetail).Controls(RST.Fields(i).Name).Value)
End If
Case Else
.....
End Select
works just fine? Didn't both do the same thing?
The table field "enddate" can accept Null values.
I tried importing everything in a new database thinking of some kind of
corruption. But didn't fix it...
There should be something with the IIF function, I guess.
Thanks,
Rocco