Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform HELP

Status
Not open for further replies.

qad122

Technical User
Nov 14, 2002
12
0
0
US
I have a continous subform that lists product name, unit price, qty, and extended price. I have a combo box set to the product name, and I have a default value on the Item Unit Price (=DLookup("[ProdUnitPrice]", "tblProduct", "[ProdID]= '" & [Me]![ItemProdID] & "'"

When entering in a new sale line item order, everything works fine, except that the next line, (which contains no data) gives a #Name?, under the unit qty on the next blank row. This prevents the sub-totaling etc. How do I keep the next blank row clear.

I posted this before, but does anyone know a code that I can use to keep the next row, which is blank and ready for data entry,totally blank. I think I am getting the #Name? error on the blank row because it is looking for a value, which there would be none until the person starts adding it.

Thanks again.

Susan


 
Hi

Why not base your Sub form on a query, which is a join between the Item Table (whatever it is called) and the Product Table (tblProduct), joined on ProdId, that way the Unit Price will be available and can be Bound Field, without the nuisance DLookup.

OR

Include the UnitPrice as a hidden column in the Combo Box, and populate the UnitPrice Column from the Item table using the appropriate .column() property of the combo box in the after update event of the combo box Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hey Ken,

I didn't see your post, so sorry for the next question that I posted. I thought about doing a select qry on it, and will see if that works. I already have a qry for the product and sale line items. The problem that I was concerned about is that I have a combo box(for Prod ID and Prod Name)the the next field is Item Unit Price, which goes next to the Qty and from there goes to an Extended Price.

For some reason I was concerned about it not working right, especially since the Extended Price field has a calculation in it that uses the Item Unit Price. Excuse my extreme ignorance, because I am certainly a beginner.

Thank You!

-Susan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top