Temporary allow additions?

  • Thread starter Thread starter evilcowstare via AccessMonster.com
  • Start date Start date
E

evilcowstare via AccessMonster.com

I have already searched previous postings for this and found some bits that
helped but not really got what i need....

I have my form set to not allow additions, so that you cant get to a new
record by using navigation button, you can only view old ones or save the one
your on.

The problem I have is that I have another form that uses a button to open up
this form to add a new entry, is there anyway I can set it up so that when
you just go into the second form you cant allow additions but if you go in
via a button on another form it will allow me to add a record, could I turn
off the additions function for say just that one record so I can add it and
save it but if someone then goes to navigate again it wont allow it?

Thank You
Jay
 
If you open the form in add, your user can actually add one record....

eg:

docmd.OpenForm "frmCustomers",,,,acFormAdd

The is what I use most of the time (I set the forms allow additions to no,
and then use the above). This means that ONE record can be added, but the
mouse wheel, or even accidental hit of the page down key will not make the
record "seem" to disappear (as the user accidentally hitting page down will
normally add a new record, but since allow additions = no, then this
confusing of the user cannot happen).

So, the above approach only allows the user to add ONE record...which is
usually what I need...

It is not clear if you need to have "many" records added, or just the one???

You could also go:
docmd.OpenForm "frmCustomers",,,,acFormAdd
forms!frmcustomers.AllowAdditions = True

the above setting will not be saved with the form.....

and, if you set dataentery = true, then they can't see old records..but ONLY
can add new reocrds....

It really depends on what you want..but, as far as I can tell, the choices
avaiable will cover your needs...
 
I have already searched previous postings for this and found some bits that
helped but not really got what i need....

I have my form set to not allow additions, so that you cant get to a new
record by using navigation button, you can only view old ones or save the one
your on.

The problem I have is that I have another form that uses a button to open up
this form to add a new entry, is there anyway I can set it up so that when
you just go into the second form you cant allow additions but if you go in
via a button on another form it will allow me to add a record, could I turn
off the additions function for say just that one record so I can add it and
save it but if someone then goes to navigate again it wont allow it?

Thank You
Jay

Open this form from the other form using the acFormAdd argument of the
OpenForm method.

DoCmd.OpenForm "FormName", , , , acFormAdd
 
Thank You !!!

Works Fab !
I have already searched previous postings for this and found some bits that
helped but not really got what i need....
[quoted text clipped - 12 lines]
Thank You
Jay

Open this form from the other form using the acFormAdd argument of the
OpenForm method.

DoCmd.OpenForm "FormName", , , , acFormAdd
 
Dear Albert:

I am confused. I *think* the OP wants the newly opened form to allow one and
*only one* addition (but I could be wrong...).
You say:
So, the above approach only allows the user to add ONE record...which is
usually what I need...

I must be doing something wrong, because if I try your suggestion, I am able
to enter multiple records, not just one.

Form1 has a command button that opens Form2. Form 2 is set
AllowAdditions=No. The code behind the command button is:
DoCmd.OpenForm "Form2", , , , acFormAdd

How am I screwing up? :)

Cheers
Fred Boer
 
How am I screwing up? :)
No, you are 100% correct...it was my bad....

I had thought that opening the form in add mode only allowed ONE record to
be added.....

I am wrong on that account.....

While it does allow the user to use the form both ways, my description of
the behaviours is simply incorrect.....
 
Well, no problem! I just thought I'd make sure, and the odds sure were
better that you would be right than me, Albert! :)

Cheers!
Fred

Go Calgary!
 
Back
Top