Update all records at once (2 Viewers)

Safari

Member
Local time
Today, 09:08
Joined
Jun 14, 2021
Messages
95
In your query named updateStoretransaction, if you switch it to SQL view, you have the following:

Code:
WHERE (((StoreTransaction.invoiceid)=[Forms]![invoicehead]![invoiceid]));

This will force your update query to update only one record at a time. In the body of the query, you have elements like this:

Code:
UPDATE StoreTransaction SET StoreTransaction.itemstoreid = [Forms]![invoicehead]![invdetails Subform]![itemname],
StoreTransaction.unit = [Forms]![invoicehead]![invdetails Subform]![unit],
...

This implies that you have only one record at a time on the form where you are gathering data. I would say this single-record update behavior is absolutely correct behavior for the combination of the query that you have used and the data sources you are employing. From this particular form, you do NOT want to update all records at once. It will contain only one record's worth of data. There is no justification for making it store data in more than one record at a time.

You insist that the problem is not solved yet. Therefore, we are looking at one of two things happening here. Either

(a) you do not understand some project that you have inherited from someone else or

(b) your description of "not updating every record" doesn't mean to you what it sounds like it means to us, which would imply a language barrier issue.

I am not going to make assumptions either way, but I will categorically state that the problem AS YOU HAVE DESCRIBED IT is totally not possible to fix at any level. The code is not broken.
Dear Sir
Iam here to learn , I'm not a expert like you .. so keep calm when you advice me or anyone else..
Thanks for your kind efforts
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 08:08
Joined
Jul 9, 2003
Messages
16,285
keep calm when you advice me or anyone else..

Richard is the most calm moderator here. I'm not so collected as Richard, but understand that you appear to be new here, although I get the impression I've seen your style of posting before?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:08
Joined
Feb 28, 2001
Messages
27,222
Dear Sir
Iam here to learn , I'm not a expert like you .. so keep calm when you advice me or anyone else..
Thanks for your kind efforts

Please do not mistake my response's intention. I try to not sugar-coat what I say, I just tell you what I see. And I cannot tell whether you have had trouble describing your problem because of language issues or because you are not very familiar with what Access does. If my direct approach is not pleasing to you, I am sorry. But I try to avoid making too many assumptions. I have found that the more assumptions I make, the more often I end up confusing people.

I can explain a lot of things but until I know which direction an explanation must go, it is hard for me to correctly respond. At the moment I am unsure of what you specifically need to know.
 

James Dickinson

PigeonPie
Local time
Today, 19:08
Joined
May 10, 2018
Messages
43
To update all records at once then remove the where condition. It will still update 1 record at a time however as that's just how access works.
The where condition is limiting the "who". So any where condition will filter your table and reduce your quantity of records effected.
 

Users who are viewing this thread

Top Bottom