' checking to see if new glb_cboRebate_Lookup exists in table already , so we do create an error with a duplicate. Set R = CurrentDb.OpenRecordset("SELECT * FROM [Program_Header] WHERE [Rebate_ID] LIKE '" & glb_cboRebate_Lookup & "' ", dbOpenDynaset, dbSeeChanges) ' WHAT HAPPENS IF IT CANT FIND ID record_count = R.RecordCount If record_count > 0 Then MsgBox "ID Already Exists!", vbCritical, "Search ID" Exit Sub End If
' checking for wildcard on string Set R = CurrentDb.OpenRecordset("SELECT * FROM [Program_Header] WHERE [Rebate_ID] LIKE '" & glb_cboRebate_LookupWild & "*' ", dbOpenDynaset, dbSeeChanges)
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.