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!

Problem with lookup and subform

Status
Not open for further replies.

laura525

Technical User
Nov 8, 2004
11
0
0
US
I am having some trouble and will try to explain as clearly as possible. I have a form for data entry, on this main form there is also a subform. I have made the form to resemble a physical paper form that will still be filled out (employers request). I have set the tab order as the same order on this paper form. There is a field that should be filled after the subform that is a lookup field. When I go in and start entering data, once I get to the subform I get an error stating that the data entered in the lookup field cannot be found (it is still blank at point, but once the focus is switched from the main form to the subform I get the error.) Is there any way to fix this. If you need more information please let me know.
Thank you
 
What information are you trying to Lookup? I'm thinking that the Lookup is trying to pull information from the (currently blank) subform and of course there is no information to lookup yet.

What are you trying to acheive with the lookup field?
 
The lookup isn't trying to pull information from the subform. It is pulling information from another table. The user will type in a Workcenter Number and the description field will display the name of that workcenter. The subform is where they will inter part numbers and info pertaining to the part No. Hope that has clarified it a bit.
 
laura525 . . . . .

Post the code that deals wih the lookup field!

Calvin.gif
See Ya! . . . . . .
 
Hi

I would suspect that the problem is that the record associated with the main form is being saved when you click on the sub form. Furtehr the 'lookup' field is probably a mandatory field in that table right?

If so change the table design to make that column non mandatory

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I just used the lookup wizard in the table for the field. Is there another way I could or should have done it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top