"Indexed or Primary Key cannot contain a Null value" / Autonumbers

Discussion in 'Microsoft Access VBA Modules' started by Kim M., Aug 8, 2009.

  1. Kim M.

    Kim M. Guest

    I keep getting this message whenever I try to enter a new record via a form.
    I click OK on the error message box, and then can continue without problems.
    But I'd still like to get rid of the message box.

    What I THINK is happening is this: The primary key is an autonumber (and
    does not appear on the form). I tried making it visible on the form to
    experiment and this is what happens: It registers as "(new)", which I guess
    is a null value, until I click the OK on the error message box, at which
    point it converts to an autonumber. So I guess my question is how do I
    trigger the assignment of the autonumber WITHOUT having to go through that
    pesky error message first?

    (The program didn't always do this, but I am unable to pinpoint when it
    started or what I did to bring it on.)

    As always, thanks for your input!
    Kim M.
     
    Kim M., Aug 8, 2009
    #1
    1. Advertisements

  2. On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    <> wrote:

    Did you compact the database; this behavior is quite unusual. The
    autonumber is generated when the first character is entered in a new
    record, whether the field is on the form or not.

    -Tom.
    Microsoft Access MVP


    >I keep getting this message whenever I try to enter a new record via a form.
    >I click OK on the error message box, and then can continue without problems.
    >But I'd still like to get rid of the message box.
    >
    >What I THINK is happening is this: The primary key is an autonumber (and
    >does not appear on the form). I tried making it visible on the form to
    >experiment and this is what happens: It registers as "(new)", which I guess
    >is a null value, until I click the OK on the error message box, at which
    >point it converts to an autonumber. So I guess my question is how do I
    >trigger the assignment of the autonumber WITHOUT having to go through that
    >pesky error message first?
    >
    >(The program didn't always do this, but I am unable to pinpoint when it
    >started or what I did to bring it on.)
    >
    >As always, thanks for your input!
    >Kim M.
     
    Tom van Stiphout, Aug 9, 2009
    #2
    1. Advertisements

  3. Kim M.

    Allen Browne Guest

    Tom's suggestion to compact/repair the database is a good one.

    If that doesn't solve it, tell us a bit more about this form. For example:

    a) Is it a form bound to a query that uses multiple tables (in which case
    Access may be trying to add a value to the other table -- particularly if
    that table has any fields with a Default Value assigned.)

    b) Is it a form with a subform that's bound to the same table (or a split
    form since this seems to be A2007.)

    c) Is there any Default Value in the text box for the autonumber field on
    your form, or in the AutoNumber field if you open the table in design view?

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.


    "Tom van Stiphout" <> wrote in message
    news:...
    > On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    > <> wrote:
    >
    > Did you compact the database; this behavior is quite unusual. The
    > autonumber is generated when the first character is entered in a new
    > record, whether the field is on the form or not.
    >
    > -Tom.
    > Microsoft Access MVP
    >
    >
    >>I keep getting this message whenever I try to enter a new record via a
    >>form.
    >>I click OK on the error message box, and then can continue without
    >>problems.
    >>But I'd still like to get rid of the message box.
    >>
    >>What I THINK is happening is this: The primary key is an autonumber (and
    >>does not appear on the form). I tried making it visible on the form to
    >>experiment and this is what happens: It registers as "(new)", which I
    >>guess
    >>is a null value, until I click the OK on the error message box, at which
    >>point it converts to an autonumber. So I guess my question is how do I
    >>trigger the assignment of the autonumber WITHOUT having to go through that
    >>pesky error message first?
    >>
    >>(The program didn't always do this, but I am unable to pinpoint when it
    >>started or what I did to bring it on.)
    >>
    >>As always, thanks for your input!
    >>Kim M.
     
    Allen Browne, Aug 9, 2009
    #3
  4. Kim M.

    Kim M. Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    I comact/repair at least once per day, so that is not it.

    a) It is bound to a query, but that query only draws from one table.
    b) There are subforms, but they are all bound to different tables/queries.
    c) No default values for either.

    Any light you could shed on this would be most appreciated!
    Kim M.

    "Allen Browne" wrote:

    > Tom's suggestion to compact/repair the database is a good one.
    >
    > If that doesn't solve it, tell us a bit more about this form. For example:
    >
    > a) Is it a form bound to a query that uses multiple tables (in which case
    > Access may be trying to add a value to the other table -- particularly if
    > that table has any fields with a Default Value assigned.)
    >
    > b) Is it a form with a subform that's bound to the same table (or a split
    > form since this seems to be A2007.)
    >
    > c) Is there any Default Value in the text box for the autonumber field on
    > your form, or in the AutoNumber field if you open the table in design view?
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    >
    > "Tom van Stiphout" <> wrote in message
    > news:...
    > > On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    > > <> wrote:
    > >
    > > Did you compact the database; this behavior is quite unusual. The
    > > autonumber is generated when the first character is entered in a new
    > > record, whether the field is on the form or not.
    > >
    > > -Tom.
    > > Microsoft Access MVP
    > >
    > >
    > >>I keep getting this message whenever I try to enter a new record via a
    > >>form.
    > >>I click OK on the error message box, and then can continue without
    > >>problems.
    > >>But I'd still like to get rid of the message box.
    > >>
    > >>What I THINK is happening is this: The primary key is an autonumber (and
    > >>does not appear on the form). I tried making it visible on the form to
    > >>experiment and this is what happens: It registers as "(new)", which I
    > >>guess
    > >>is a null value, until I click the OK on the error message box, at which
    > >>point it converts to an autonumber. So I guess my question is how do I
    > >>trigger the assignment of the autonumber WITHOUT having to go through that
    > >>pesky error message first?
    > >>
    > >>(The program didn't always do this, but I am unable to pinpoint when it
    > >>started or what I did to bring it on.)
    > >>
    > >>As always, thanks for your input!
    > >>Kim M.

    >
    >
     
    Kim M., Aug 9, 2009
    #4
  5. Kim M.

    Allen Browne Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    Hmm: if this is an attached table, did you compact the back end database?

    You may want to run these recovery steps on both the front end (where the
    forms are) and the back end (if the tables are attached):
    http://allenbrowne.com/recover.html

    If that doesn't solve it, post the exact error message you are receiving.
    And double-check if there's anything in the form's BeforeInsert event.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.


    "Kim M." <> wrote in message
    news:...
    > I comact/repair at least once per day, so that is not it.
    >
    > a) It is bound to a query, but that query only draws from one table.
    > b) There are subforms, but they are all bound to different tables/queries.
    > c) No default values for either.
    >
    > Any light you could shed on this would be most appreciated!
    > Kim M.
    >
    > "Allen Browne" wrote:
    >
    >> Tom's suggestion to compact/repair the database is a good one.
    >>
    >> If that doesn't solve it, tell us a bit more about this form. For
    >> example:
    >>
    >> a) Is it a form bound to a query that uses multiple tables (in which case
    >> Access may be trying to add a value to the other table -- particularly if
    >> that table has any fields with a Default Value assigned.)
    >>
    >> b) Is it a form with a subform that's bound to the same table (or a split
    >> form since this seems to be A2007.)
    >>
    >> c) Is there any Default Value in the text box for the autonumber field on
    >> your form, or in the AutoNumber field if you open the table in design
    >> view?
    >>
    >> --
    >> Allen Browne - Microsoft MVP. Perth, Western Australia
    >> Tips for Access users - http://allenbrowne.com/tips.html
    >> Reply to group, rather than allenbrowne at mvps dot org.
    >>
    >>
    >> "Tom van Stiphout" <> wrote in message
    >> news:...
    >> > On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    >> > <> wrote:
    >> >
    >> > Did you compact the database; this behavior is quite unusual. The
    >> > autonumber is generated when the first character is entered in a new
    >> > record, whether the field is on the form or not.
    >> >
    >> > -Tom.
    >> > Microsoft Access MVP
    >> >
    >> >
    >> >>I keep getting this message whenever I try to enter a new record via a
    >> >>form.
    >> >>I click OK on the error message box, and then can continue without
    >> >>problems.
    >> >>But I'd still like to get rid of the message box.
    >> >>
    >> >>What I THINK is happening is this: The primary key is an autonumber
    >> >>(and
    >> >>does not appear on the form). I tried making it visible on the form to
    >> >>experiment and this is what happens: It registers as "(new)", which I
    >> >>guess
    >> >>is a null value, until I click the OK on the error message box, at
    >> >>which
    >> >>point it converts to an autonumber. So I guess my question is how do I
    >> >>trigger the assignment of the autonumber WITHOUT having to go through
    >> >>that
    >> >>pesky error message first?
    >> >>
    >> >>(The program didn't always do this, but I am unable to pinpoint when it
    >> >>started or what I did to bring it on.)
    >> >>
    >> >>As always, thanks for your input!
    >> >>Kim M.

    >>
    >>
     
    Allen Browne, Aug 10, 2009
    #5
  6. Kim M.

    Kim M. Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    Everything compacted, still happening. Nothing in "BeforeInsert" event for
    form.

    Here is the error:
    Index or primary key cannot contain a Null value. (Error 3058)


    "Allen Browne" wrote:

    > Hmm: if this is an attached table, did you compact the back end database?
    >
    > You may want to run these recovery steps on both the front end (where the
    > forms are) and the back end (if the tables are attached):
    > http://allenbrowne.com/recover.html
    >
    > If that doesn't solve it, post the exact error message you are receiving.
    > And double-check if there's anything in the form's BeforeInsert event.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    >
    > "Kim M." <> wrote in message
    > news:...
    > > I comact/repair at least once per day, so that is not it.
    > >
    > > a) It is bound to a query, but that query only draws from one table.
    > > b) There are subforms, but they are all bound to different tables/queries.
    > > c) No default values for either.
    > >
    > > Any light you could shed on this would be most appreciated!
    > > Kim M.
    > >
    > > "Allen Browne" wrote:
    > >
    > >> Tom's suggestion to compact/repair the database is a good one.
    > >>
    > >> If that doesn't solve it, tell us a bit more about this form. For
    > >> example:
    > >>
    > >> a) Is it a form bound to a query that uses multiple tables (in which case
    > >> Access may be trying to add a value to the other table -- particularly if
    > >> that table has any fields with a Default Value assigned.)
    > >>
    > >> b) Is it a form with a subform that's bound to the same table (or a split
    > >> form since this seems to be A2007.)
    > >>
    > >> c) Is there any Default Value in the text box for the autonumber field on
    > >> your form, or in the AutoNumber field if you open the table in design
    > >> view?
    > >>
    > >> --
    > >> Allen Browne - Microsoft MVP. Perth, Western Australia
    > >> Tips for Access users - http://allenbrowne.com/tips.html
    > >> Reply to group, rather than allenbrowne at mvps dot org.
    > >>
    > >>
    > >> "Tom van Stiphout" <> wrote in message
    > >> news:...
    > >> > On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    > >> > <> wrote:
    > >> >
    > >> > Did you compact the database; this behavior is quite unusual. The
    > >> > autonumber is generated when the first character is entered in a new
    > >> > record, whether the field is on the form or not.
    > >> >
    > >> > -Tom.
    > >> > Microsoft Access MVP
    > >> >
    > >> >
    > >> >>I keep getting this message whenever I try to enter a new record via a
    > >> >>form.
    > >> >>I click OK on the error message box, and then can continue without
    > >> >>problems.
    > >> >>But I'd still like to get rid of the message box.
    > >> >>
    > >> >>What I THINK is happening is this: The primary key is an autonumber
    > >> >>(and
    > >> >>does not appear on the form). I tried making it visible on the form to
    > >> >>experiment and this is what happens: It registers as "(new)", which I
    > >> >>guess
    > >> >>is a null value, until I click the OK on the error message box, at
    > >> >>which
    > >> >>point it converts to an autonumber. So I guess my question is how do I
    > >> >>trigger the assignment of the autonumber WITHOUT having to go through
    > >> >>that
    > >> >>pesky error message first?
    > >> >>
    > >> >>(The program didn't always do this, but I am unable to pinpoint when it
    > >> >>started or what I did to bring it on.)
    > >> >>
    > >> >>As always, thanks for your input!
    > >> >>Kim M.
    > >>
    > >>

    >
     
    Kim M., Aug 10, 2009
    #6
  7. Kim M.

    Allen Browne Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    Kim, I'm beginning to think this may be another index in your table.

    Open it in design view.
    Open the Indexes dialog.
    What indexes are there?

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.


    "Kim M." <> wrote in message
    news:...
    > Everything compacted, still happening. Nothing in "BeforeInsert" event
    > for
    > form.
    >
    > Here is the error:
    > Index or primary key cannot contain a Null value. (Error 3058)
    >
    >
    > "Allen Browne" wrote:
    >
    >> Hmm: if this is an attached table, did you compact the back end database?
    >>
    >> You may want to run these recovery steps on both the front end (where the
    >> forms are) and the back end (if the tables are attached):
    >> http://allenbrowne.com/recover.html
    >>
    >> If that doesn't solve it, post the exact error message you are receiving.
    >> And double-check if there's anything in the form's BeforeInsert event.
    >>
    >> --
    >> Allen Browne - Microsoft MVP. Perth, Western Australia
    >> Tips for Access users - http://allenbrowne.com/tips.html
    >> Reply to group, rather than allenbrowne at mvps dot org.
    >>
    >>
    >> "Kim M." <> wrote in message
    >> news:...
    >> > I comact/repair at least once per day, so that is not it.
    >> >
    >> > a) It is bound to a query, but that query only draws from one table.
    >> > b) There are subforms, but they are all bound to different
    >> > tables/queries.
    >> > c) No default values for either.
    >> >
    >> > Any light you could shed on this would be most appreciated!
    >> > Kim M.
    >> >
    >> > "Allen Browne" wrote:
    >> >
    >> >> Tom's suggestion to compact/repair the database is a good one.
    >> >>
    >> >> If that doesn't solve it, tell us a bit more about this form. For
    >> >> example:
    >> >>
    >> >> a) Is it a form bound to a query that uses multiple tables (in which
    >> >> case
    >> >> Access may be trying to add a value to the other table -- particularly
    >> >> if
    >> >> that table has any fields with a Default Value assigned.)
    >> >>
    >> >> b) Is it a form with a subform that's bound to the same table (or a
    >> >> split
    >> >> form since this seems to be A2007.)
    >> >>
    >> >> c) Is there any Default Value in the text box for the autonumber field
    >> >> on
    >> >> your form, or in the AutoNumber field if you open the table in design
    >> >> view?
    >> >>
    >> >> --
    >> >> Allen Browne - Microsoft MVP. Perth, Western Australia
    >> >> Tips for Access users - http://allenbrowne.com/tips.html
    >> >> Reply to group, rather than allenbrowne at mvps dot org.
    >> >>
    >> >>
    >> >> "Tom van Stiphout" <> wrote in message
    >> >> news:...
    >> >> > On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    >> >> > <> wrote:
    >> >> >
    >> >> > Did you compact the database; this behavior is quite unusual. The
    >> >> > autonumber is generated when the first character is entered in a new
    >> >> > record, whether the field is on the form or not.
    >> >> >
    >> >> > -Tom.
    >> >> > Microsoft Access MVP
    >> >> >
    >> >> >
    >> >> >>I keep getting this message whenever I try to enter a new record via
    >> >> >>a
    >> >> >>form.
    >> >> >>I click OK on the error message box, and then can continue without
    >> >> >>problems.
    >> >> >>But I'd still like to get rid of the message box.
    >> >> >>
    >> >> >>What I THINK is happening is this: The primary key is an autonumber
    >> >> >>(and
    >> >> >>does not appear on the form). I tried making it visible on the form
    >> >> >>to
    >> >> >>experiment and this is what happens: It registers as "(new)", which
    >> >> >>I
    >> >> >>guess
    >> >> >>is a null value, until I click the OK on the error message box, at
    >> >> >>which
    >> >> >>point it converts to an autonumber. So I guess my question is how
    >> >> >>do I
    >> >> >>trigger the assignment of the autonumber WITHOUT having to go
    >> >> >>through
    >> >> >>that
    >> >> >>pesky error message first?
    >> >> >>
    >> >> >>(The program didn't always do this, but I am unable to pinpoint when
    >> >> >>it
    >> >> >>started or what I did to bring it on.)
    >> >> >>
    >> >> >>As always, thanks for your input!
    >> >> >>Kim M.
    >> >>
    >> >>

    >>
     
    Allen Browne, Aug 11, 2009
    #7
  8. Kim M.

    Kim M. Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    There are two indexes:

    1. CaseAutonumber (the autonumber field)
    2. CaseID (this is the primary key)


    "Allen Browne" wrote:

    > Kim, I'm beginning to think this may be another index in your table.
    >
    > Open it in design view.
    > Open the Indexes dialog.
    > What indexes are there?
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    >
    > "Kim M." <> wrote in message
    > news:...
    > > Everything compacted, still happening. Nothing in "BeforeInsert" event
    > > for
    > > form.
    > >
    > > Here is the error:
    > > Index or primary key cannot contain a Null value. (Error 3058)
    > >
    > >
    > > "Allen Browne" wrote:
    > >
    > >> Hmm: if this is an attached table, did you compact the back end database?
    > >>
    > >> You may want to run these recovery steps on both the front end (where the
    > >> forms are) and the back end (if the tables are attached):
    > >> http://allenbrowne.com/recover.html
    > >>
    > >> If that doesn't solve it, post the exact error message you are receiving.
    > >> And double-check if there's anything in the form's BeforeInsert event.
    > >>
    > >> --
    > >> Allen Browne - Microsoft MVP. Perth, Western Australia
    > >> Tips for Access users - http://allenbrowne.com/tips.html
    > >> Reply to group, rather than allenbrowne at mvps dot org.
    > >>
    > >>
    > >> "Kim M." <> wrote in message
    > >> news:...
    > >> > I comact/repair at least once per day, so that is not it.
    > >> >
    > >> > a) It is bound to a query, but that query only draws from one table.
    > >> > b) There are subforms, but they are all bound to different
    > >> > tables/queries.
    > >> > c) No default values for either.
    > >> >
    > >> > Any light you could shed on this would be most appreciated!
    > >> > Kim M.
    > >> >
    > >> > "Allen Browne" wrote:
    > >> >
    > >> >> Tom's suggestion to compact/repair the database is a good one.
    > >> >>
    > >> >> If that doesn't solve it, tell us a bit more about this form. For
    > >> >> example:
    > >> >>
    > >> >> a) Is it a form bound to a query that uses multiple tables (in which
    > >> >> case
    > >> >> Access may be trying to add a value to the other table -- particularly
    > >> >> if
    > >> >> that table has any fields with a Default Value assigned.)
    > >> >>
    > >> >> b) Is it a form with a subform that's bound to the same table (or a
    > >> >> split
    > >> >> form since this seems to be A2007.)
    > >> >>
    > >> >> c) Is there any Default Value in the text box for the autonumber field
    > >> >> on
    > >> >> your form, or in the AutoNumber field if you open the table in design
    > >> >> view?
    > >> >>
    > >> >> --
    > >> >> Allen Browne - Microsoft MVP. Perth, Western Australia
    > >> >> Tips for Access users - http://allenbrowne.com/tips.html
    > >> >> Reply to group, rather than allenbrowne at mvps dot org.
    > >> >>
    > >> >>
    > >> >> "Tom van Stiphout" <> wrote in message
    > >> >> news:...
    > >> >> > On Sat, 8 Aug 2009 14:55:01 -0700, Kim M.
    > >> >> > <> wrote:
    > >> >> >
    > >> >> > Did you compact the database; this behavior is quite unusual. The
    > >> >> > autonumber is generated when the first character is entered in a new
    > >> >> > record, whether the field is on the form or not.
    > >> >> >
    > >> >> > -Tom.
    > >> >> > Microsoft Access MVP
    > >> >> >
    > >> >> >
    > >> >> >>I keep getting this message whenever I try to enter a new record via
    > >> >> >>a
    > >> >> >>form.
    > >> >> >>I click OK on the error message box, and then can continue without
    > >> >> >>problems.
    > >> >> >>But I'd still like to get rid of the message box.
    > >> >> >>
    > >> >> >>What I THINK is happening is this: The primary key is an autonumber
    > >> >> >>(and
    > >> >> >>does not appear on the form). I tried making it visible on the form
    > >> >> >>to
    > >> >> >>experiment and this is what happens: It registers as "(new)", which
    > >> >> >>I
    > >> >> >>guess
    > >> >> >>is a null value, until I click the OK on the error message box, at
    > >> >> >>which
    > >> >> >>point it converts to an autonumber. So I guess my question is how
    > >> >> >>do I
    > >> >> >>trigger the assignment of the autonumber WITHOUT having to go
    > >> >> >>through
    > >> >> >>that
    > >> >> >>pesky error message first?
    > >> >> >>
    > >> >> >>(The program didn't always do this, but I am unable to pinpoint when
    > >> >> >>it
    > >> >> >>started or what I did to bring it on.)
    > >> >> >>
    > >> >> >>As always, thanks for your input!
    > >> >> >>Kim M.
    > >> >>
    > >> >>
    > >>

    >
     
    Kim M., Aug 14, 2009
    #8
  9. Kim M.

    Kim M. Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    Jim,
    Yes I have a NEW button. It was created using the automated options in
    Access, so there is a macro rather than code associated with it. Is it
    possible to do a breakpoint/stepthru in a macro?
    Kim M.

    "JimBurke via AccessMonster.com" wrote:

    > I wouldn't think that error was due to your auto-number field. Do you have a
    > button on your form that you use for creating a new record? If so, I would
    > set a breakpoint at the beginning of that button's on-click event and then
    > step through to see exactly where the error occurs. I'm assuming this form is
    > bound to a table or query. If so, does that table have related tables? Maybe
    > the error is due to a field that is used as a key in a related table.
    >
    > Kim M. wrote:
    > >I keep getting this message whenever I try to enter a new record via a form.
    > >I click OK on the error message box, and then can continue without problems.
    > >But I'd still like to get rid of the message box.
    > >
    > >What I THINK is happening is this: The primary key is an autonumber (and
    > >does not appear on the form). I tried making it visible on the form to
    > >experiment and this is what happens: It registers as "(new)", which I guess
    > >is a null value, until I click the OK on the error message box, at which
    > >point it converts to an autonumber. So I guess my question is how do I
    > >trigger the assignment of the autonumber WITHOUT having to go through that
    > >pesky error message first?
    > >
    > >(The program didn't always do this, but I am unable to pinpoint when it
    > >started or what I did to bring it on.)
    > >
    > >As always, thanks for your input!
    > >Kim M.

    >
    > --
    > Jim Burke
    >
    > Message posted via AccessMonster.com
    > http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200908/1
    >
    >
     
    Kim M., Aug 14, 2009
    #9
  10. Kim M.

    John Spencer Guest

    Re: "Indexed or Primary Key cannot contain a Null value" / Autonum

    You can use Single Step (on the menu) to step thru a macro, but you do
    have to be in Macro design view to do that.

    '====================================================
    John Spencer
    Access MVP 2002-2005, 2007-2009
    The Hilltop Institute
    University of Maryland Baltimore County
    '====================================================


    JimBurke via AccessMonster.com wrote:
    > I don't think there's any way to step through a macro. If the macro uses
    > 'RunCode' to call a function you could step through the called function, but
    > that's about it. What exactly does the macro do? Is it simply going to a new
    > record? Can you list the macro Actions and their associated parameters? Is
    > there ANYTHING in the NEW button's click event other than the macro call and
    > error handling?
     
    John Spencer, Aug 14, 2009
    #10
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. placek

    The field X cannot contain a null value because the ..........

    placek, Jul 1, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    5
    Views:
    207
    placek
    Jul 4, 2004
  2. placek

    The field X cannot contain a null value ......

    placek, Aug 1, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    137
    placek
    Aug 1, 2004
  3. tonyck

    How to refrence primary key and forgine key

    tonyck, Jul 7, 2005, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    289
    tonyck
    Jul 7, 2005
  4. tonyck
    Replies:
    0
    Views:
    426
    tonyck
    Jul 18, 2005
  5. Allen Browne
    Replies:
    0
    Views:
    418
    Allen Browne
    Jul 18, 2005
Loading...

Share This Page