R
Rpettis31
I am trying to lookup if there is a record based on an item on a different
table.
Basically there is a list box and if the item on the list has a record an
item record form opens in edit mode and if not then a new item record is
created.
I am trying to use a dlookup, to do this in a test mode below but I am
apparently doing something wrong.
Private Sub List8_DblClick(Cancel As Integer)
lstItem = Me.List8.Column(1)
recID = DLookup("Item", "tblItemRecords", "lstItem = " & Nz(lstItem, 0))
If recID = 0 Then _
ms = MsgBox("HELLO", vbCritical)
table.
Basically there is a list box and if the item on the list has a record an
item record form opens in edit mode and if not then a new item record is
created.
I am trying to use a dlookup, to do this in a test mode below but I am
apparently doing something wrong.
Private Sub List8_DblClick(Cancel As Integer)
lstItem = Me.List8.Column(1)
recID = DLookup("Item", "tblItemRecords", "lstItem = " & Nz(lstItem, 0))
If recID = 0 Then _
ms = MsgBox("HELLO", vbCritical)