brandon000000
Mar 23 2011, 03:58 PM
Ok this is what i am trying to do. I have table1 that has aproximately 500 records and aprox. 50 different fields. I need to be able to run a query that will pull one entire row of records by the part number. It would go something like this, on my Form i type in 777-ab1234. I then press SET. This would activate the query and save to table2. I need that to be the only receord on table2 becuase of the report i have designed for that information. So on table 1 all 500 records are there and now on table2 the specific reecord is there with all 50 fields. Any thoughts?
Thanks,
brandon
John Spencer
Mar 23 2011, 04:03 PM
My first thought is why have a table at all.
You can use a query as if it were a table.
The query would be
SELECT * FROM Table1 WHERE Somefield = "777-ab1234"
You could build the query string on the fly or you could refer to the control on the form in the query.
SELECT * FROM Table1 WHERE SomeField = Forms![Name of the form]![Name of the control]
swgeof
Mar 23 2011, 04:03 PM
Why do you need it in a seperate table? You can just have a query that uses that entry on the form as the criteria. If you need an example, I can upload one for you.
brandon000000
Mar 23 2011, 05:03 PM
That would be great thanks
brandon000000
Mar 23 2011, 05:56 PM
Thanks, I think that an example would help me understand what you are telling me.
Thanks,
Brandon
swgeof
Mar 23 2011, 08:43 PM
Here is the example, the form should open when launch the database. Let me know if you have any questions.
brandon000000
Mar 24 2011, 02:42 PM
Thanks for the example.
I took what you did and i was able to work it into what i am trying to do. It works exactly how i need it to.
I appreciate your help on this.
Thanks,
Brandon
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.