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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can i Delete a Single Record in DataSheet View

Status
Not open for further replies.

tayyabakashif

Technical User
Joined
Feb 28, 2004
Messages
17
Location
PK
Hello Dear Sir
How Can i Delete a record in a datasheet view.
i mean if we want to delete a single record.i have to right click on beging of record then push the delete from menu and after that a msg appear.or select the record and press delete the keyboard.

My """""Question """""
i don't want to use the mouse in upper cases i have to use the mouse.
how can i select a record with single button by keyboard and delete it.i want to delete the record with single button press don't want to use the mouse.and don't want a message.
Any Help will Greatly Appreciated
 
How are ya tayyabakashif . . . . .

In a new Macro in the Macro Window, make a macro that includes the following commands (the [blue]hotkey[/blue] is currently set for [blue]F12[/blue], you can change it to what you want):
Code:
[blue]Macro Name     Action      Command
----------   ----------  ------------
{F12}        RunCode     SelectRecord
             RunCode     DeleteRecord
             StopMacro[/blue]
Save and name the Macro [purple]AutoKeys[/purple].

If you want to get permamently get rid of the confirmation message: [blue]MenuBar[/blue] - [blue]Tools[/blue] - [blue]Options[/blue] - [blue]Edit/Find Tab[/blue]. In the [blue]Confirm Section[/blue] remove the check from [blue]Record changes[/blue]. Click OK.

[purple]Note: The record conatining the cursor is the one selected & deleted. So make sure the cursor is in the record of your choice.[/purple]

Thats it . . . give it a whirl, check the [purple]hotkey[/purple] works, and let me know . . . .

Calvin.gif
See Ya! . . . . . .
 
If you do not want to use mouse you an use arrows to select record. Then ALT E for edit menu and delete is there or ALT R will delete record. This this what you mean?
 
On What Event the Macro has to put.
i have done all works as you said for macro.but
when i click f12 the microsoft default working done.
any more help o r you send me the example file
 
Yo can also program the macro which selects your records to turn off warning-messages.

Set "DisplayWarnings" to No as the first procedure in the macro. (it might be called something slightly different, you'll find it).



 
[blue]On What Event the Macro has to put.
i have done all works as you said for macro.but
when i [purple]click f12[/purple] the microsoft default working done.[/blue]
I'm not sure what you mean?

This is not a VBA routine and is not run by an event. Its run by the [blue]HotKey F12[/blue] within the macro itself! [purple]A Macro is not VBA![/PURPLE]

All you should have to do is put the cursor on the record to be deleted and hit the F12 key. . . .

Have you made a macro before?

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top