The parameter boxes suggest that the Expression Service is not able to find
the objects you referred to.
Perhaps the subform control has a Name that is different from the name of
the form loaded into the control (its Source Object.) To test that, open the
Immediate Window (Ctrl+G) while the form is open, and enter:
? [forms]![pohdrecv]![mmpolnsub].[form]![prodno]
If the name seems correct, try concatenating the values into the string:
Dim strSql As String
strSql = "INSERT INTO tbl_inventory ([product#], quantity) VALUES " & _
Me.mmpolnsub.Form!prodno & ", " & Me.mmpolnsub.Form!received & ");"
'Debug.Print strSql
dbEngine(0)(0).Execute strSql, dbFailOnError
That should get you going, but a more fundamental question is when this
fires. Do you trust the use to remember to click the button? Is there any
chance they might click the button more than once? How can you tell later if
the values in tbl_inventory accurately reflect the true quantities? Is there
a better way to design this, so Access can calculate the correct quantities
or you, and the results can never be wrong?
If these questions are relevant, you might be interested in reading:
Inventory Control - Quantity On Hand
at:
http://allenbrowne.com/AppInventory.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi!,
> I am fairly new to ACCESS and have had help to get me this far with the
[quoted text clipped - 33 lines]
> And as Always THANKS IN ADVANCE!!!!
> Chip
Chip - 09 Apr 2006 15:26 GMT
THANKS!!!
you were correct! I had the forms mis-named in the script! I did not look
that direction as it did not give me an error like it usally does if it
cannot find a textbox.
THANKS A MILLION!!!
Chip
> The parameter boxes suggest that the Expression Service is not able to find
> the objects you referred to.
[quoted text clipped - 60 lines]
> > And as Always THANKS IN ADVANCE!!!!
> > Chip