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 October 23rd, 2003, 10:24 AM
JJ JJ is offline
Registered User
 
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sync'ing forms

Hi All,

Anyone know of some good example code of synchronising forms in ADP projects? I've got a form displaying a list of orders and a details pop up form that shows expanded details of the selected order.

I can get this to work but if if a field is changed I can't get the main list to update without doing a form requery.

If I do this two calculated fields which worked fine when the form was orginally opened display "#Error". (I'm using Access 2000 Sp3)

Many thanks
J
 
Old October 23rd, 2003, 02:05 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What are you using for recordset for the popup form?
Have you tried the refresh method instead?

Sal
 
Old October 24th, 2003, 08:00 AM
JJ JJ is offline
Registered User
 
Join Date: Jun 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm modifying the recordsource of the popup form to SELECT * FROM tblOrders WHERE OrderID=X, where X is the selected Order on the listing form.

I've tried requery and refresh and they do the same.

Actually, I just put a button on the main details form to requery the form and when I pressed that the two calculated fields come up with error. They were fine when the form opened up!

Cheers
J
 
Old October 24th, 2003, 08:56 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On the after update event of the textbox that you changed, re-set the calculated field

with txtCalc 'this is the name of the calculated textbox
     .SetFocus
     .Text = "New Value"
end with

Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms mildge Access 1 March 22nd, 2005 08:32 AM
Opening forms from other forms Paulsh Access VBA 1 September 30th, 2004 06:54 PM





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