A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

autofill a field on a form with default value



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2008, 11:05 PM posted to microsoft.public.access.forms
Donna
external usenet poster
 
Posts: 565
Default autofill a field on a form with default value

I have tblApplication Table. I have a tblContract Table. I have a continuous
form that uses these 2 tables to allow the user to create a quick contract
for everyone who has submitted an application. In most cases the "start"
(date) field will always be the same date. So I would like a way to have the
default value of the "frmCreateContract.Start" to automatically fill in the
field when it is null. Once "Start" has a value, or is edited, I would want
that value to hold & not resort back to the default everytime the form is
opened.

Right now I have the default value of the form field set to 9/16/2008 but
when I open the form, all records show up with the "Start" field empty. Then
the last record or next NEW record waiting to be created has the default
value in it. But I need it to fill in all the records I'm showing -- quickly.

Can this be done without having to copy & paste the start date into each
record?
  #2  
Old April 30th, 2008, 12:19 AM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default autofill a field on a form with default value

Try setting the default of the field in the table.
--
KARL DEWEY
Build a little - Test a little


"Donna" wrote:

I have tblApplication Table. I have a tblContract Table. I have a continuous
form that uses these 2 tables to allow the user to create a quick contract
for everyone who has submitted an application. In most cases the "start"
(date) field will always be the same date. So I would like a way to have the
default value of the "frmCreateContract.Start" to automatically fill in the
field when it is null. Once "Start" has a value, or is edited, I would want
that value to hold & not resort back to the default everytime the form is
opened.

Right now I have the default value of the form field set to 9/16/2008 but
when I open the form, all records show up with the "Start" field empty. Then
the last record or next NEW record waiting to be created has the default
value in it. But I need it to fill in all the records I'm showing -- quickly.

Can this be done without having to copy & paste the start date into each
record?

  #3  
Old April 30th, 2008, 03:51 PM posted to microsoft.public.access.forms
Rockn
external usenet poster
 
Posts: 48
Default autofill a field on a form with default value

You could also do some VBA for the form when it is submitted to test the
field for a Null value and if it is Null insert the current date or whatever
date you want.


"KARL DEWEY" wrote in message
...
Try setting the default of the field in the table.
--
KARL DEWEY
Build a little - Test a little


"Donna" wrote:

I have tblApplication Table. I have a tblContract Table. I have a
continuous
form that uses these 2 tables to allow the user to create a quick
contract
for everyone who has submitted an application. In most cases the "start"
(date) field will always be the same date. So I would like a way to have
the
default value of the "frmCreateContract.Start" to automatically fill in
the
field when it is null. Once "Start" has a value, or is edited, I would
want
that value to hold & not resort back to the default everytime the form is
opened.

Right now I have the default value of the form field set to 9/16/2008 but
when I open the form, all records show up with the "Start" field empty.
Then
the last record or next NEW record waiting to be created has the default
value in it. But I need it to fill in all the records I'm showing --
quickly.

Can this be done without having to copy & paste the start date into each
record?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:12 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.