Your criteria section should completely in quotes, so you your example, instead of putting quotes around each field, it should be around the whole statement. Let me know if that does not make sense.
Thanks for your help. Now I'm getting an error saying "Access can't find the name InventoryTransactions.ProductCode that you entered in the expression.
InventoryTransactions is the table that the query is based on.
Can you paste the SQL here? I see what you are trying to do, but I need to see the query itself. Click on the SQL button on the button bar and copy the SQL statement and paste it here.
It looks like you are trying to use the dlookup to pull data from a diferent table other than the one you have on your query. That would not work. Dlookup only works on the current dataset. Here is how you should rewrite your query:
SELECT
InventoryTransactions.ProductCode,
Manufacturer,
InventoryTransactions.TransactionID,
InventoryTransactions.TransactionDate,
InventoryTransactions.PurchaseOrderNo,
InventoryTransactions.TransactionDescription,
InventoryTransactions.UnitPrice,
InventoryTransactions.UnitsOrdered,
InventoryTransactions.UnitsReceived,
InventoryTransactions.UnitsSold,
InventoryTransactions.UnitsShrinkage
FROM
InventoryTransactions
inner join Products1 on [inventoryTransactions].[ProductCode]=[Products1].[ProductCode];
You are correct. It would not be updateable. The DLookup is only for referencing data, but you can only do it with the current dataset. If you try to do it with another table, Access will complain that it can't find the table because the table is not in the current query as a linked table.
Unfortunately, what you would have to do is save the data you want put into your tables and after all changes have been made on the form, have a button that saves the data to each table that needs to be updated. There are just times where you can't easily update.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.