#Deleted showing on form and Error 2455

galantis

Registered User.
Local time
Today, 07:09
Joined
Feb 10, 2005
Messages
32
Hi,

Sometime when I delete a record on a form using the wizard delete button and I move between records, #Deleted record shows up.

Can anyone help me in getting rid of it? or why is it ocurring?

Also, I am getting error "2455 : You entered an expression that has an invalid reference to the property |"

thankyou.
 
To avoid seeing the #Deleted, put me.refresh after you delete a record (this should on the button Delete).
 
galantis,

Try the following line at the end of the code for the Delete button:

Me.Requery

Wayne
 
Try this:

On Error GoTo Err_deleterecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_deleterecord_Click:
Exit Sub

Err_deleterecord_Click:
MsgBox Err.Description
Resume Exit_deleterecord_Click


on 'button_click' in the code.
 
According to Microsoft DoMenuItem is obsolete, and has been for years.
You should replace them with the RunCommand method instead ;)
 
thanks for your input.

I have tried using both DoMenuItem and RunCommand on this form. In one my test cases, I get this error when I first create a new record using

DoCmd.GoToRecord , , acNewRec

and trying to delete the new record using both DoMenuItem and RunCommand, I get this error message

2046: The Command or Action '|' isn't available now

I can only delete this record only after closing and re-opening the form again.
 

Users who are viewing this thread

Back
Top Bottom