Getting data from a form into a table

FISHiEE

Fish obsessive
Local time
Today, 02:14
Joined
Nov 12, 2004
Messages
86
Hi,

This could be extremely simple but it's not something I have done before so would appreciate some pointers.

I have a form ("frm_ArchiveEntry")with 3 text boxes ("txt_Date", "txt_WorkInProgress" and "txt_CompletedStock") into which the user enters data.

I have a table ("tbl_Archive") with 3 fields ("a/cCode", "StockValue" and "StockTakeDate") to which data is added to using an append query (Run from a button on "frm_ArchiveEntry") which collects summary data from another table for a/cCode and StockValue.

Firstly I would like this report to also take the value of the "Date" textbox and enter this value for the "StockTakeDate" for these records when running the append query(or afterwards if necessary).

Secondly I am need to write some code that would enter 2 new complete records into "tbl_Archive":

Record 1 would have "a/cCode" = "Work In Progress", "StockValue" = Value of "txt_WorkInProgress" and "StockTakeDate" = Value of "txt_Date".

Record 2 would have "a/cCode" = "Completed Stock", "StockValue" = Value of "txt_CompletedStock" and "StockTakeDate" = Value of "txt_Date".

As I said, this is probably really simple, but this is the first time I have been trying to enter data into a table from a form that is not directly linked to it, and don't really have a clue where to start!


If someone could just give me an idea of the basic code to get data from cell A of form B to Field X of record Y in table Z I can probably suss it out from that.


Thanks in advance for any help anyone can give.
 
This thread should get you started as far as how to get data from an unbound form to a table.
 

Users who are viewing this thread

Back
Top Bottom