PDA

View Full Version : DCount()



Kundan
12-31-2018, 01:22 AM
If DCount("[REG_NO]", "Tbl_Regn", "[REG_NO] =" & Me.Parent.[ID]) > 0 Then
Msgbox “Rec Exists”
Endif


The underlined statement is giving Runtime Error '2471'
The expr you entered as a query parameter produced this error: 'F'


Please guide me.

OBP
12-31-2018, 02:39 AM
You could try
If DCount("[REG_NO]", "Tbl_Regn", "[REG_NO] = '" & Me.Parent.[ID] & "'") > 0 Then

Do you know what value Me.Parent.[ID] returns?
Have you saved the record before invoking the DCount?

Kundan
12-31-2018, 09:32 PM
You could try
If DCount("[REG_NO]", "Tbl_Regn", "[REG_NO] = '" & Me.Parent.[ID] & "'") > 0 Then

Do you know what value Me.Parent.[ID] returns?
Have you saved the record before invoking the DCount?


Thanks Thanks Thanks!!! GOD BLESS YOU!!!