Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2006, 06:02 AM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recordsource

Hi!

Got a question regarding recordsource of forms...
In access, when we assign the recordsource of a form to a table,
any updates by the user on the form is immediately propagated to the table.

How do we break this chain? i.e., how can we, after fetching the data from the underlying table, block any write to the data, until the user clicks on a save button?

Thanks in advance!



Scripts82
__________________
Scripts82
 
Old March 2nd, 2006, 08:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

The way to do this is NOT to set the control source of the form to the table. Make the form UNbound. You then populate the form with a COPY of the data in the table. You work with the copy and then after you're done with one of its records your save button will then take the local copy of the info and send it to the table itself.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old March 3rd, 2006, 09:29 PM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks SerranoG
i get what you mean.

But, I can do that with Single Form view.
All the examples that I find from books are only using "Single" form view.

How do I do it for continuous form view?

Thanks in advance!

Scripts82
 
Old March 6th, 2006, 09:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:How do I do it for continuous form view?
You're in luck. The view doesn't matter. The approach and outcome will be the same. Work with an unbound continuous form, make a copy of the recordset and make that the record source, work with the copy, when done, write the updated data back to the table.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old March 7th, 2006, 03:04 AM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! I will look into that!

Scripts82





Similar Threads
Thread Thread Starter Forum Replies Last Post
Array as recordsource for Report prasanta2expert Access VBA 1 March 14th, 2008 04:21 PM
Access Subform RecordSource Issue llaurit Access 3 March 12th, 2008 01:04 PM
Changing Report's RecordSource ! penta Access 11 April 30th, 2005 11:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.