Hi,
I use DCount function to count the number of entries for the existing customer by name of the customer in the database table.
Table Structure like: CustRegion, CustName, OrdersPlaced.
One of the customers has a name like O'Neil
but when searching it reads like
CustName = 'O'Neil" (Neil is being ignored and is being displayed as syntax
error.
Can you please help me in searching these names.
I appreciate any help
I use DCount function to count the number of entries for the existing customer by name of the customer in the database table.
Table Structure like: CustRegion, CustName, OrdersPlaced.
One of the customers has a name like O'Neil
Code:
Me.lblOrderCount.Caption = "Total Orders Placed: " & DCount("CustName", "backUpData", "[CustRegion] = '" & Me.cmbCustRegion.Value & "' and [CustName] = '" & Me.lstRMName.ItemData(Me.lstRMName.ListIndex) & "'")
CustName = 'O'Neil" (Neil is being ignored and is being displayed as syntax
error.
Can you please help me in searching these names.
I appreciate any help
Comment