Autonumber problems when first field is in subform

  • Thread starter Thread starter Nic
  • Start date Start date
N

Nic

Hello all -
I have a form where the first place the user is most likely to go is the
first subform to start entering in data. The problem with this is that the
ID of the new record is still set to (autonumber) and does not get a number
when data is entered into a subform of a form. So I get an error from my
subform complaining about no key field.
I've tried placing:
RunCommand acCmdSaveRecord
in the "On Enter" event of the subform, but that didn't help. I also placed
Me.Dirty = False
in the Form_Load event for the parent form.

Any ideas?
I'm in Access 2000 BTW.

Thanks!
-Nic
 
Nic said:
Hello all -
I have a form where the first place the user is most likely to go is the
first subform to start entering in data. The problem with this is that the
ID of the new record is still set to (autonumber) and does not get a number
when data is entered into a subform of a form. So I get an error from my
subform complaining about no key field.
I've tried placing:
RunCommand acCmdSaveRecord
in the "On Enter" event of the subform, but that didn't help. I also placed
Me.Dirty = False
in the Form_Load event for the parent form.

Any ideas?
I'm in Access 2000 BTW.
You have to have the auto number. To do that you have to have a record.
The onLoad event can place a value for you and create the record.
However, if they start entering data in the subform then there is most
likely something wrong.
If it were an invoice for example you would be selling to nobody. The master
record must have something that makes it a master and if it is new and does
not require anything then it is not a "master"
 
You have to have the auto number. To do that you have to have a record.
The onLoad event can place a value for you and create the record.
However, if they start entering data in the subform then there is most
likely something wrong.
If it were an invoice for example you would be selling to nobody. The master
record must have something that makes it a master and if it is new and does
not require anything then it is not a "master"
Well there are fields in the master form. The first thing that they do is
select all the relating cases in a subform though.
Hmm.. putting in a value somewhere is a good idea though. I'll play around
with that.
Thanks
-Nic
 
Back
Top