olorin
Registered User.
- Local time
- Today, 01:55
- Joined
- Jun 9, 2006
- Messages
- 81
Hi,
I have some code that I just can't get over the line
I'm trying to deal with a scenario where a comp is not found in the table, but I keep getting the invalid use of null error.
Any help would be greatly appreciated
I have some code that I just can't get over the line
Code:
Dim CompID As Integer
'look for component
CompID = DLookup("ID", "tblComps", "Pnum = '" & Forms!frmGoodsIn!tbScanComp & "'")
If CompID = False Then 'not found
MsgBox "No component found, is this a new Component?", vbQuestion, "No Comp found"
Else 'found
bunch of other stuff that works
end if
Any help would be greatly appreciated