Senin, 01 Maret 2021

Re: [MSAccessProfessionals] HIDE BY DEFAULT MSG

Sayyed,

It looks like you are moving backwards from some recommendations and still haven't provided the data type of OTID.

Dim strSQL as String
strSQL = "DELETE * FROM T_EmpOTFooter WHERE CheckRightOT = false  And  OTID = " & Forms!F_EmpOTHeader!OTID

Debug.Print strSQL

Currentdb.Execute strSQL, dbFailOnError



Regards,
Duane


From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of crystal (strive4peace) via groups.io <strive4peace2008=yahoo.com@groups.io>
Sent: Monday, March 1, 2021 7:53 AM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] HIDE BY DEFAULT MSG
 

also another error. In SQL, just use the fieldname, not fieldname.value

CheckRightOT.value-->
CheckRightOT

On 3/1/2021 7:49 AM, crystal (strive4peace) via groups.io wrote:

hello Sayyed,

>"remove by default msg"

do you mean the feedback when you run the code?

Use Currentdb.Execute SQL
or db.Execute WHERE db is CurrentDb and then released when the procedure is done

not DoCmd

~~~

this syntax looks wrong:
"DELETE * FROM T_EmpOTFooter WHERE CheckRightOT.value = false " And " OTID = " & Forms!F_EmpOTHeader!OTID

perhaps this, if OTID is a number?
"DELETE * FROM T_EmpOTFooter WHERE CheckRightOT.value = false And OTID = "
& Forms!F_EmpOTHeader!OTID

if OTID is text,  then this:
& "'" & Forms!F_EmpOTHeader!OTID & "'"

kind regards,
crystal

On 3/1/2021 12:06 AM, SAYYED ASHFAQUE HUSSAIN via groups.io wrote:

Hi,  I need to remove by default msg of my below code. Is this possible?    strSQL = "DELETE * FROM T_EmpOTFooter WHERE CheckRightOT.value = false " And " OTID = " & Forms!F_EmpOTHeader!OTID    Thanks in advance.

Tidak ada komentar:

Posting Komentar