New record via code only

cable

Access For My Sins
Local time
Today, 13:34
Joined
Mar 11, 2002
Messages
226
I want to fill some fields when a new record is created, and these fields can then not be altered afterwards.

I have a new button on the form which works, but because I also have record navigation I have the new button on that which doesn't run the code.

Can I disable the button on the record navigation (allowadditons stops any new record being added)?

Or can I get code to run on the creation of a new record and only then?
 
You can certainly get code to run on a new record only ... use the On Current event and test for NewRecord

If Me.NewRecord then

etc.
 
thanks, thought it might be something simple using an event...just didn't know the check for new records

thanks again!
 

Users who are viewing this thread

Back
Top Bottom