BrianE
Registered User.
- Local time
- Today, 21:08
- Joined
- Mar 6, 2008
- Messages
- 10
I have a query that updates a field on a table with the value in another field.
When I run the query from the Access control panel, the query does exactly what it should do, 100% perfect. When I call the query using DoCmd.OpenQuery in VBA in an OnClick function on a form, it does not work properly, only appending certain amounts of information, leaving some fields blank.
Can anyone shed some light on this.
the SQL for the query is:
UPDATE tblHolding SET tblHolding.CostGRV = [tblHolding]![OrderCost]
WHERE ((([tblHolding].[Item Code])=[tblHolding]![Item Code]));
It populates another field in the same record in the same table as itself.
tblHolding is populated by a Subform on the Form that has the button that calls this query when clicked.
Hope I am making sense.
When I run the query from the Access control panel, the query does exactly what it should do, 100% perfect. When I call the query using DoCmd.OpenQuery in VBA in an OnClick function on a form, it does not work properly, only appending certain amounts of information, leaving some fields blank.
Can anyone shed some light on this.
the SQL for the query is:
UPDATE tblHolding SET tblHolding.CostGRV = [tblHolding]![OrderCost]
WHERE ((([tblHolding].[Item Code])=[tblHolding]![Item Code]));
It populates another field in the same record in the same table as itself.
tblHolding is populated by a Subform on the Form that has the button that calls this query when clicked.
Hope I am making sense.
Last edited: