Dynamic Default Values

  • Thread starter Thread starter Wizardx8
  • Start date Start date
W

Wizardx8

Guest
Hi everyone, I am relatively new to MS Access and databases in general, so hopefully this can be solved easily...

I am creating a table where data will be inputted directly, not through a form... I am trying to set up so that the default value of a certain text field, will be whateever was entered into the previous record...

eg.

Say in Record1 I enter "string" in Field1, When I go to enter a new record I would like Field1's default value to be "string"

Is this possible? If so how do I go about doing it please...

Thanks

Wiz :D
 
Wiz,

I would recommend creating a form for data entry. This will then enable you to achieve exactly what you want.
(Not to say it can't be done in a table - I just don't know how (or why) it would be done).

Data entry into a table directly is limited.

You could construct your form to appear as a table if that is your concern.

Brad.
 
Brad, thank you for the advice... OK I have convinced the client to use a form for data entry...

Now how would I set this up in a form if you don't mind me asking, I really am pretty new to all fo this... :)
 
Thanks Brad, an interesting approach to be sure... Have come up with what I think may do the trick though...

Have a simple query that finds that one cell... In the form have the default value use an expression that uses the results of that query... This is all a bit beyond me but will see what I can do, thanks for the tip :)
 
Another approach

Try this on the GotFocus event of the control:

SendKeys "^(')" 'Ctrl + '


When the control has the focus the code will execute and the value of the previous record in this control will be copied.


HTH,

Lyn
 

Users who are viewing this thread

Back
Top Bottom