Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

Subform question...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe - 28 Jun 2007 17:22 GMT
OK, my question is this.

I have a form/subform.  The subform is based on a table where I can do data
entry until it is time to save that captured data.  My question is what is
the best way to delete a selected record on the subform?  Should I query the
underlying table and delete that item and the requery the subform, or is
there a more elegant way to accomplish this?

Any help would be appreciated.
SteveM - 28 Jun 2007 18:40 GMT
If you have record selectors visible, click on that and then hit your Delete
key.

Steve

> OK, my question is this.
>
[quoted text clipped - 5 lines]
>
> Any help would be appreciated.
Joe - 28 Jun 2007 18:58 GMT
Thanks for the thought.  I don't have that enabled.

What I ended up doing was putting a delete button on the main form
and then when that is clicked it passes focus back to the subform to the
record that had focus and then deletes that record.

It works.

> If you have record selectors visible, click on that and then hit your Delete
> key.
[quoted text clipped - 10 lines]
> >
> > Any help would be appreciated.
John W. Vinson - 28 Jun 2007 21:31 GMT
>What I ended up doing was putting a delete button on the main form
>and then when that is clicked it passes focus back to the subform to the
>record that had focus and then deletes that record.

WUPS! That's dangerous. When you click the button on the mainform the record
on the subform nolonger HAS the focus! I'm not sure you can count on deleting
the correct record!

            John W. Vinson [MVP]
John W. Vinson - 28 Jun 2007 20:47 GMT
>OK, my question is this.
>
[quoted text clipped - 5 lines]
>
>Any help would be appreciated.

Well, there is a "simpler" (if not particularly elegant) way; just be sure
that the subform's record selectors are visible, click the bar to the left of
the record, and hit the Delete key.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.