I'm currently making a mockup Access Database with a customer POS built into it via forms. What I am trying to do is pull 3 pieces of info from a form: the size of the coffee, the cream amount, and the sugar amount, and put them in the tempOrder table for later use. Problem being I grab the ID for the coffee from another table. If this isn't possible, I guess I'll have to hardcode the values into the form somehow instead of referencing another table. Here is what I have so far to get the coffee ID and put it into the table:
INSERT INTO tempOrder ( ProductID )
SELECT ProductID
FROM Product
WHERE ProductName = FORMS!HotCoffee!hotCoffeeChoice'
-edit-
In essence, what I'm trying to do is pull the size of the coffee the user wants, the amount of cream, and the amount of sugar all from one form once a button is clicked, and put these into a table that holds all items that are in the current order. The cream and sugar are in text boxes, while the coffee sizes are in a list box, the contents of which are from a query finding all items in a seperate Product table that have the description 'coffee' (Small, medium, large). When I pull this info from the form, it is simply the size in plaintext. To pull and convert this back to the ProductID, I call the above code. The problem is that I would like the cream and sugar to be placed in the same row as the ProductID, and do not know how to go about this.
FORM has productName, cream, and sugar readily available
orderTable requires productID, cream, and sugar
I convert productName to productID and insert it into orderTable with the above code, making it currently impossible to also grab cream and sugar and put them in the same record.
INSERT INTO tempOrder (ProductID) VALUES DLookup(etc). Look up how to use DLookup.