Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is code faster than a macro

Status
Not open for further replies.

Costefran

Technical User
Jan 2, 2008
197
GB
Can anyone help

I have VB code that executes on click of a command button which runs a macro that closes the form and then a delete query with deletes the previous form record from the underlying table

I expected the form to close first so I would not get the standard "Record is Deleted" message as I do not want the user to see this and then the record would be deleted from the table with no message. However, I am still getting the message

Would this be because the macro is still running or is the VB code sequential and will not carry out the next instruction until the current instruction has finished

Maybe there is an easier way to do this

If anyone can help I would appreciate very much as I keep going round in circles with this problem

Thanks
 
In your macro, are your first two actions Echo and Setwarnings, both set to No? Then at the end of your macro, reset them to Yes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top