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

Form Displays Correct Data, but data is not stored in table

Status
Not open for further replies.

jjepsen

Technical User
Jan 30, 2002
5
US
I have a form that has a combo box I use to look up parts information. As soon as I select a new part 4 other fields are then populated with different information about this part. The problem I am having is that the form displays this data, but is not writing the data to the table. I am having the form refresh itself every time a part number is changed so that the other fields show the correct data. Also once I input a record and lets say I go back to change the part number, once again the form will show the correct information but will not write this information. If anybody can help or wants to take a look at what I have going on I can email the database. Thanks
 
Just to clarify, the 4 fields look up the data from a table based on the selection from the combo box?

Which data do you want to write - the contents of the combo box, or the four fields, or all of it?

Is the combo box linked to a field in the table that you want to write the data to?

Are the 4 blank fields in the table you want to write the data to (they should be).

Happy to take a look at it - simond@terra.com.br
 
That would be a yes to all questions. The Combo box looks up a value for the four field which are listboxes. The lookup data on the form is to be stored in a main table. The control source for the fields are in the main table and using a select statement compares a value from the form to a value in the parts table and then populates the field but does not store it. Here is the select statement I am using, is there any way to incorporate this statement into a text box instead or is there a way to make this field write to the main table as soon as it is populated?

SELECT [Part_Lookup].[NSN], [forms].[main].[part number] FROM Part_Lookup WHERE ((([forms].[main].[part number])=[Part_Lookup].[part number]));

I dont know what the deal is with all the parenthisis, access put those in. Thanks for the help
 
This may be a stupid question, but is this form bound to a table? (RecordSource) If so, do these fields have control sources? Maq B-)
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top