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

Main/Sub Form Questions

Status
Not open for further replies.

ktchan741

Technical User
Dec 7, 2003
28
SG
Hi,
I have created a Form_A and Table_A, Table_B and Table_C.
In Form_A, Table_B and Table_C are sub-form placed in a Control Tab in Form_A. Table_A is part of Form_A but not in the Control Tab. I have created a "CANCEL" command button.

What I am looking at is to ensure that when I click on the "CANCEL" command button, no data is saved in Table_A, Table_B and Table_C.

Can anyone offer some advise on how to go about his?

Thanks.



 
I hate for your question to go un-answered as I believe it highlights weakeness of MS forms...as you can see i'm trying stir a discussion.

Here are 3 possible methods:
1. use unbound form + temporary tables for the subforms
2. use dao transactions
3. use ActiveX controls for your child-data (e.g. third party grid control(?) if one exists)

Here is an example of 2.

Access 2002 desktop developer's handbook also provides an example on using transactions with subforms, and you could probably find other examples using google.

If your app is multi-user then, I think the best solution is to use temporary tables because (from my experience) binding a form to a dao rs using transactions invokes pesimistic locking regardless of how the workspace environment is setup.

As far as I know, using a disconnected ADO rs instead of DAO offers no advantages, because binding a ADO rs to a form producers a read-only rs (based on Jet Data).

cheers,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top