query Check box fault. (1 Viewer)

Bladerunner

Registered User.
Local time
Today, 02:17
Joined
Feb 11, 2013
Messages
1,799
Have a simple problem that has become not so simple. I am updating a tblpurchasing via a query. The purchasing tbl has a TransferKey (Ckbox) field that only becomes 'true, -1 or Yes' when the newly purchased stock is updated to a master file. To do this I use two queries. One to update (append) to the master file that works fine. the other is an update query that update the TransferKey field from false to true. I have tried yes/no, -1,0 ,, true/false.

The fields of the update query, I have a TransferKey (field), tblpurchasing(table), (Yes) Update to field and finally Not In (Yes) criteria field. The query pulls up the correct (false) records but will not update it to True, Yes or -1, no matter what I do. Have checked everything from spelling to field lengths etc. Would like to think I have thought of everything but it is evident, I have forgot something.... Hope someone can help.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 19:17
Joined
Jan 20, 2009
Messages
12,853
What errors do you get?

If using SetWarnings False, don't turn them off.

What is the back end environment?

BTW It would be better to avoid the what you are doing and construct the data so that Inventory is calculated directly from the Purchasing transactions. Then you can tick the box for booking them in and they will be added to the inventory calculations.
 

Bladerunner

Registered User.
Local time
Today, 02:17
Joined
Feb 11, 2013
Messages
1,799
What errors do you get?

If using SetWarnings False, don't turn them off.

What is the back end environment?

BTW It would be better to avoid the what you are doing and construct the data so that Inventory is calculated directly from the Purchasing transactions. Then you can tick the box for booking them in and they will be added to the inventory calculations.

Get no errors . It seems that everything works ok. If I alternate the Yes and No in the criteria it pulls up the correct records. It just not allow me to change (update) the transferkey from No to yes or vise-versa. It has worked in the past but tonight for some reason it does not.
What do you mean by the back end environment?
 

Bladerunner

Registered User.
Local time
Today, 02:17
Joined
Feb 11, 2013
Messages
1,799
Here is the SQL of the query:

UPDATE tblPurchasingRecord SET tblPurchasingRecord.[Updated to MS] = Yes
WHERE (((tblPurchasingRecord.[Updated to MS])=No));

It actually pulls up the seven records that are tagged as 'no'. What it does not do is update them (place a check in the box).

I can see no fault in it. Hope you can.
 

Bladerunner

Registered User.
Local time
Today, 02:17
Joined
Feb 11, 2013
Messages
1,799
Just forget it, I will make it work another way.. Do appreciate the help you did give.
Have a great evening.
Blade
 

Users who are viewing this thread

Top Bottom