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

Form data to a table

Status
Not open for further replies.

Aett

MIS
Jan 30, 2006
15
US
Hello all, what I'm trying to do is send all data that is currently displayed on a form to a table.

I have a few text box which is getting their data from dlookup functions based upon a user enter number in another text box. Once the Dlookup has retrieved it's data and all data is being displayed on the form I would like to click a button to add all the data showing on the form to a table. How would I go about doing this?

Thank you in advance.
 
If the data is obtained with a dlookup function, it seems that the data must all ready be in a table?


Randy
 
Hello Randy, no, the data from the Dlookup is coming from a query. The deal is part of the data on the form is coming from another source and the other part is coming from dlookup's.

I want to throw everything that is displayed on the form at a given time into a table.
 
Not sure I understand how you're getting the data, but why not simply use an Append Query?

Randy
 
I need to be able to append what the form displays to a table. I don't want the user to ever mess with the database window, and thus click the queries tab and run an append query.
Is there a way to capture the data that a form is presenting to a table?
 
Perhaps if you base the form on the table you want and always open the form to a new record. You will probably need a save record button.

Randy
 
I have two live database tables linked to this access db. I'm doing a dlookup based on a query that is driven by the data a user types in, into an initial text box on the form.

For example, the user would enter an rx_num, based on that rx number 6 other fields are populated using dlookup. There a few other fields on the form that get their data from other table(s). Now I want to throw all of this..that is the form results into a table...is that possible?
 
Once again, it sounds like the information is all ready in the database. It is very bad practice to duplicate it in another table. However, if you insist on doing so, I'm afraid your stuck with basing the form on the result table, as I suggested earlier, or creating an append query.


Randy
 
Actually, I think I got it. I took your advice and made a append query but in the field name I typed: RX_NUM: [Forms]![Form1]![Text0] and did similar for all the other fields on the form I need to append to a table.

I have a command button on the form called Append data which runs the above query.

viola
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top