immedate update of query info from another query

crossy5575

Registered User.
Local time
Today, 18:12
Joined
Apr 21, 2015
Messages
46
Hi there

I have a product order form (purchaseorder) which has a tabbed subform (prodtab) in which there is a query form (qrymanual2 subform1) this splits the products over 5 pages into categories for the use to select quantities.

I also have another query which based on the same tables and is a query summarising the number of items and total cost. This is on the form (purchaseorder) and is (summary order subform)

When I enter the order into (qrymanual2 subform1) - (summary order subform) it only updates when the tab is changed. I would like this to happen when the data is entered.

I have gone into the design view of (qrymanual2 subform1) and in the “after insert” event I have the following codes:

=[Forms]![purchaseorder].[Form]![summary order subform].[refresh]
=[Forms]![purchaseorder]![Prodtab].[Form]![summary order subform].[requery]

Looking at http://access.mvps.org/access/forms/frm0031.htm I have used various incarnations of requery and refresh to no avail. Can anyone help?

When you put a form based on a query to update I assume you can do it on the form rather than calling the query to update.
 
With the = it looks like you may be entering that directly into the property? Try it as VBA code, which goes here (without "=":

http://www.baldyweb.com/FirstVBA.htm

I'd probably use the after update event rather than after insert.
 
Use AfterUpdate event:

Me.Parent![Summary Order Subform].Form.Requery
 
[Forms]![purchaseorder].[Form]![summary order subform].[requery]

thanks the above worked when put in as sql into the after update.

brilliant!
 

Users who are viewing this thread

Back
Top Bottom