After Insert not firing, ,needed for autonumber field

I'm currently using access 2003.  I have a sub form that is linked to a table with a few fields including a reference id (explained later) and an auto number.

the reference id refers to an aspect of the main form that is then used in a where statement for the recordset for the subform.

(example to explain.  we are looking at item 1 on main form.  subform shows all records where reference id = 1)

I was trying to use an after insert event to go and update the database, but that is not firing and not erroring.

question:  what could cause this to not fire/what is a solution to this -or- what is another/better method to solve this problem?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

After insert will only fire on a bound form. Is your main form bound?

If it is bound you should link the sub form to the main form iso using the where clause.
Have you considered linking the main and subform with the master and child links fields?  Without knowing your field names, you would use the reference id of each form as those link fields.  This method will automatically display subform records related to the main form's reference id without having to set the subform recordsource manually.
Also check that the after insert property window is showing "event procedure"
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

quad341Author Commented:
i'm curious as to how to tell access how to link the two forms exactly.  the main form is bounded itself, but how can i bind the lesser form to the main one?  for any examples, feel free to just use generic titles.  a NDA stops me from being specific about the database
Linking the two forms requires that there be a relationship between the dataset of the main form to the dataset of the subform.  It's typically a one to many relationship.  You would have a field that is common with both and that's typically the Primary Key of the main form's dataset and a the Foreign Key in the subform's dataset.  I think you already have this situation.  If that is true then just select the subform CONTROL (not the subform IN the control) and in the subform property sheet go to the Data Tab.  Then set the Link Child Field and the Link Master Field to the field that relates the two datasets.  Pulldown the field list along side each property.  The way it looks to the datasets is something similar to this:

Main Form Dataset
MainID - PK   Autonumber Long Integer<---------Master Link Field

Sub Form Dataset
SubDetailID - PK  Autonumber Long Integer
MainID - FK   Long Integer                  <------Child Link Field

So in the example above in the Link Master Field you would select MainID and in the Link Child Field you would also select MainID.  Now when ever you move to a different record in the Main Form, the subform will display the data related to it if there is any. If you want to you can edit the subform data to edit data related to the main form.  You can even add additional subform records.  This is also cool when you use a Combobox to lookup a record in the Main Form.  

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
'MainID' is the same as your 'reference id'
quad341Author Commented:
ach.  accepted slightly too soon.

why might one of my fields in one of my databases not show for making the link?  all other fields show fine.  it is the last field in the database, but it does not appear in as a choice in the list, essentially making the link impossible.  any ideas?
quad341Author Commented:
ok, i added a dummy field below the one not showing up and it appeared (with the other one...) so everything works great.  thanks!
????? :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.