Update a field in a table

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.
 
S

Stephen Knapp

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
 
Top