Ok, this is the simplest bit of code you'll see all day - that doesn't stop access having a serious logical problem with it though...
Private Sub Form_Open(cancel As Integer)
Dim upd1, upd2 As String
If Me!updatedby = Null Then
upd1 = " "
Else
upd1 = Me!updatedby
End If
If Me!updatedon = Null Then
upd2 = " "
Else
upd2 = Me!updatedon
End If
DoCmd.Maximize
End Sub
Run-time Error! Invalid use of null (highlights
upd2 = Me!updatedon
line). A bit of mouse hovering and it tells me that Me!updateon = Null. But if that's the case, why hasn't it skipped the Else?
I'm confused....
any ideas would be appreciated.
Jordan
Private Sub Form_Open(cancel As Integer)
Dim upd1, upd2 As String
If Me!updatedby = Null Then
upd1 = " "
Else
upd1 = Me!updatedby
End If
If Me!updatedon = Null Then
upd2 = " "
Else
upd2 = Me!updatedon
End If
DoCmd.Maximize
End Sub
Run-time Error! Invalid use of null (highlights
upd2 = Me!updatedon
line). A bit of mouse hovering and it tells me that Me!updateon = Null. But if that's the case, why hasn't it skipped the Else?
I'm confused....
any ideas would be appreciated.
Jordan