Update a field in a table

  • Thread starter Thread starter Wayne Taylor
  • Start date Start date
W

Wayne Taylor

Hi All

I have some code which generates a reference (not unique). I need to know
how to get the field populated automatically when a new record is created. I
want it to act the same as when you used the =NOW function in a fields
default value.

Can any one help.

Thanks in advance.
 
Wayne said:
Hi All

I have some code which generates a reference (not unique). I need to know
how to get the field populated automatically when a new record is created.
I
want it to act the same as when you used the =NOW function in a fields
default value.

Can any one help.

Thanks in advance.

You should be able to trigger your code when a new record is created if
you are using a form. You will need to assure your users use that form
however.
 
Is the non-unique reference number supposed to mean something? If not
and it's "just a number," why not define the field as an AutoNumber (in the
table's design mode) and let the system automatically generate a number for
you. If the non-unique reference number is supposed to have meaning, it's
going to get messy. Either you'll need to build some form of composite
number (using multiple fields in the table) or write VBA code to spawn the
reference once the user activates the form or does something on the form to
cause a new reference to be needed.

Steve in Ohio
 
Joseph said:
You should be able to trigger your code when a new record is created if
you are using a form. You will need to assure your users use that form
however.

Sorry, that response for to a different question. I wonder what I
wrote them???
 

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

Back
Top