troubleshooting Question

Help with delete query

Avatar of KLM56
KLM56 asked on
Microsoft AccessVisual Basic ClassicMicrosoft Excel
2 Comments1 Solution769 ViewsLast Modified:
It's me again. I have manage to delete records from an access table using an excel userform using the code below. But the only way I am able do so if all fields have a value it it.  So I have a date field and about 6 other numeric fields. When I search for a record, it may not have a value in one of the fields. If it doesn't before I can delete it, I would need to replace the blank fields with a 0, update it, then I can delete the record. How can I delete the record regardless of blank fields or not.

strDelete = "Delete from tblMsrTotals Where businessDate = #" & txtbusinessDate.Text & "# and advances = " & txtadvances.Text & " and advanceAmount = " & txtadvanceAmount.Text & " and denied = " & txtdenied.Text & " and stopPayments = " & txtstopPayments.Text & " and branchLoc = " & txtbranchLoc.Text & " and cpg = " & txtCpg.Text & ""
Lee Wadwell
Project Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”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.

-Mike Kapnisakis, Warner Bros