Dear Gents,
Um facing a situation that i need to check if the serialNumber i entered on the form is available in the serialsTables or no , If exist then continue code if not then prompt me a msg "This serial not valid for this Itemcode"
Here is the code but i think there will be bunch of updates on it to work properly.
Code:Dim strSQL As StringDim rs As DAO.Recordset strSQL = "Serials" Set rs = CurrentDb.OpenRecordset(strSQL) With rs If Not .BOF And Not .EOF Then .MoveLast .MoveFirst While (Not .EOF) If Combo450 = DLookup("SerialNumber", "Serials", "ItemID = '" & [Form_Add an Order and Details].Child12.Form!Code & "'") Then Else End If .MoveNext Wend End If .Close End With