Autonum Problem

  • Thread starter Thread starter Norman P. via AccessMonster.com
  • Start date Start date
N

Norman P. via AccessMonster.com

I have a contact form that uses a table with the autonum as the primary
key. When a new contact is created a new number is created with the
autonum.

On this contact form I have a button for notes. I user can enter several
notes for the contact. Each note is dated and timestamped.

My problem is that when I click on the button to add a new note, the
autonum will not show the record number, it stays on a blank autonum. When
I try to enter a note it's locked.

If I go into the notes table I can add notes, but not via the form when I
click on the button to bring up the notes for that record.

Can anyone lead me in the right direction on this one??

Thanks,
Norman
 
Norman,

Its sounds as if the notes form is a continuous form that you wish to
function as a subform control with a field related to the autonum on the
main form.. A popup form won't automatically number the Child link.

You can easily handle this using the OpenArgs property of the popup form.

If you are using the DoCmd.OpenForm method, it would look something like
this:

DoCmd.OpenForm "SomeForm", , , , , , [PrimaryNumField]

Where SomeForm is the name of the popup form and [autoNumField] is the name
of your Primary key.

On the popup form as the Default Property for the field you want to populate
with the primary key, type in [OpenArgs].

As soon as you enter a value on the popup form, the field will populate.

God Bless,

Mark A. Sam
 
Back
Top