How can I use a form to overwrite data in the table?

G

Guest

I have a table to store data of items in my inventory. There is a form, which
is used to search data of the item in the table and display it on the form.
In the form, there is a field used to display the actual time, but I cannot
get the form to overwrite the timing in the table.

In the table, I have intentionally left time field blank. How can I get the
form to display the time on the field in the form and overwrite the time data
to the table?

Thanks....
 
T

tina

make sure the time field is included in the form's RecordSource. you can use
a SetValue macro action to set the time field, of the current record, to the
current time. or set the value in VBA code, as

Me!NameOfTimeField = Now

you have to decide when the macro or VBA action should run: when the user
moves to a record? (use the form's Current event.) when the user changes
something in a record? (use the form's BeforeUpdate event.) when the user
clicks a command button? (use the command button's Click event.) you get the
idea.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top