Sure:
Query
SELECT [*Inventory Log].PharmID AS Expr1, [*Inventory Log].AutoNumber AS Expr2, [*Inventory Log].RemoveDate AS Expr3, [*Inventory Log].RemoveReason AS Expr4, [*Inventory Log].MedName AS Expr5, [*Inventory Log].Strength AS Expr6, [*Inventory Log].DEA AS Expr7, [*Inventory Log].QtyRemoved AS Expr8, [*Inventory Log].MedStatus AS Expr9, [*Inventory Log].Tote AS Expr10, [*Inventory Log].MoveDate AS Expr11, [*Inventory Log].NoShow AS Expr12, [*Inventory Log].DestroyedDate AS Expr13
FROM [*Inventory Log]
WHERE ((([*Inventory Log].[NoShow]) Is Null) AND (([*Inventory Log].[DestroyedDate]) Is Null))
ORDER BY [*Inventory Log].AutoNumber;
Code:
Private Sub Med_Name_AfterUpdate()
Me![C#] = (DLookup("[DEA]", "Medications", "[MedName] = Forms![*Inventory Form]![Med Name]"))
If IsNull(DLookup("[Tote]", "TotePic", "[MedName] = Forms![*Inventory Form]![Med Name]")) Then
Me![Tote Num] = 3
Else
Me![Tote Num] = (DLookup("[Tote]", "TotePic", "[MedName] = Forms![*Inventory Form]![Med Name]"))
End If
End Sub
I even found this on the form onclose event :
*Validation.OnClose