Updating Data from a Combo List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my form I have a Query that shows me what items have not been
used/available. The Query list though, even after I assign the first number,
keeps the same data. not until i close the form will it update. here is the
SQL View if anyone can help. Or is there a seting that I need to change?!?!

SELECT Tbl_PalletJacks.PalletJacks, Tbl_PPL_Main.PalletsJacksOut,
Tbl_PPL_Main.PalletsJacksIn
FROM Tbl_PalletJacks LEFT JOIN Tbl_PPL_Main ON Tbl_PalletJacks.PalletJacks =
Tbl_PPL_Main.PalletsJacksOut
GROUP BY Tbl_PalletJacks.PalletJacks, Tbl_PPL_Main.PalletsJacksOut,
Tbl_PPL_Main.PalletsJacksIn
HAVING (((Tbl_PPL_Main.PalletsJacksOut) Is Null));
 
try adding a Requery action to the combo box's OnEnter event, using either a
macro or VBA.

hth
 
In my form I have a Query that shows me what items have not been
used/available. The Query list though, even after I assign the first number,
keeps the same data. not until i close the form will it update. here is the
SQL View if anyone can help. Or is there a seting that I need to change?!?!

SELECT Tbl_PalletJacks.PalletJacks, Tbl_PPL_Main.PalletsJacksOut,
Tbl_PPL_Main.PalletsJacksIn
FROM Tbl_PalletJacks LEFT JOIN Tbl_PPL_Main ON Tbl_PalletJacks.PalletJacks =
Tbl_PPL_Main.PalletsJacksOut
GROUP BY Tbl_PalletJacks.PalletJacks, Tbl_PPL_Main.PalletsJacksOut,
Tbl_PPL_Main.PalletsJacksIn
HAVING (((Tbl_PPL_Main.PalletsJacksOut) Is Null));

The problem is not in the SQL (though there are problems in the SQL,
see below); it's in the form. You need to Requery the "query list"
(whatever that might be - Access doesn't use "list" objects other than
a Listbox control).

Are you opening the query Datasheet to view the data? If so, don't.
Datasheets are of very limited value. Consider using a Subform
instead.

You can make the query more efficient by not using a Totals query;
you're not summing or counting anything, so there is no need for the
GROUP BY. Also, since PalletsJacksOut must be NULL by the criterion,
there's no reason to include it in the query. Try

SELECT Tbl_PalletJacks.PalletJacks, Tbl_PPL_Main.PalletsJacksIn
FROM Tbl_PalletJacks LEFT JOIN Tbl_PPL_Main
ON Tbl_PalletJacks.PalletJacks = Tbl_PPL_Main.PalletsJacksOut
WHERE (((Tbl_PPL_Main.PalletsJacksOut) Is Null));


John W. Vinson[MVP]
 
Back
Top