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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not in the list 1

Status
Not open for further replies.

canett

Technical User
Jan 22, 2006
18
BG
I have the following problem.I have a form and a subform based on a query,and this query does not allow the choice of other products.And it is quite logical, since the parameter is (SELECT Max([orderid]) FROM orders).
Naturally no other product can be chosen. I am wondering can i find a trick with both to have the cake and to eat it.I mean to preserve the condition and at the same time to be able to choose and add other products from the table products.Shall i change the source or use some NotIn the List methods?
 
Interesting how you you select orders and that ask questions about adding products. NotInList will let you type in text that is not in the combobox, assuming you are using text for the product field. Would you like to try restating the question?
 
Thank you for the reply.I understand my question about Noin the list was irrelevant.Mt problem is the following.If you open the subform and try to choose say the fourth product,when closing the form you will get the following message:
"The Microsoft Jet database engine cannot find a record in the table orders with key matching fieldss 'orderid' My question is can i make the subform accept also edditing and adding new products under the same order number ? For example, the last order is 5791 and consists of two products: First Products and Third Products.I want to add to this order say Fourth Products.But my form does not allow it.Can i make it accepting editing of the order?

 
Though your subform is linked by orderid, are you setting the default value for this field to orderid. So when you add the new record, the orderid is set to 5791. Otherwise the value is set to 0 and this may be raising your error. You can put the field on the form and set visible = false so it isn't show, but set the orderid.defaultvalue = parent!orderid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top