Append data from unbound fields

JPR

Registered User.
Local time
Today, 02:09
Joined
Jan 23, 2009
Messages
202
Hello friends,
I am having a bit of problem in trying to create an append query to store data from unbound textboxes to a table. I know that it's not the correct way to manage my db and will give you some quick info.
Once a week I get a txt file which I import in my table "Clients". During the week, data can change and want to store in a different table named "History" which gives me an historical record of all the new data. Obviously the following week, data in "clients" is update and this explains the reason of having an historical log.

I would like to append the new data that users will add in Tab New Data of form Clients to the table History, taking the FileNo as criteria. Once saved, the new data unbound textboxes, should be null ready for other data to be entered.
For your convenience, I have attached a simple examples db.
Thank you for any help.
 

Attachments

put in the full path for the update value,
update table set [status] = forms!myForm!txtBox
 
Thank you.
Sorry but where should I write it. Not very familiar with it. Should I create a query and how can I refer to the unbound fields?
 
The easiest way for you would be to create a query qryAClientHistory in the QBR window and enter the form controls into the QBE columns.
The run that, the set the fields to "" with VBA.

So build the query, run it manually so you know it works.
Then write some VBA to run the query and a few lines to clear the controls.

I see you are using macros which will make it a little more cumbersome, but I believe you would use SetValue to clear the controls.

Use the Expression Builder to get everything correct.

HTH
 
here you may test.
 

Attachments

Users who are viewing this thread

Back
Top Bottom