Set Allow Additions = No in the form property sheet.
If you wish you can also set Navigation Buttons =No to hide everything in your screenshot
Thank you for your reply.
it works but when I go for a new record using my button an error comes up in my code:
How do I solve this?Code:Private Sub agregarRegistro_Click() Me.Undo If MsgBox("¿Quieres agregar un nuevo registro?", vbQuestion + vbYesNo, "Pregunta") = vbYes Then End If DoCmd.GoToRecord , , acNewRec Me.cmdMandarCorreo.Enabled = False End Sub
It creates an error because the code I supplied disabled adding new records as requested
Your if...end if code does nothing.
Move End if to the last line
Before the new record line add me.AllowAddtions=True
But what is the point of disabling it just to re-enable it?
Hi, it works for the first time but it appears again when a second record is introduced. I have written in the code on Form_Current: "Me.AllowAdditions = False". However the same error as I mentioned before comes up.
In your previous question, you asked how to allow new records again. I gave you an answer. You appear to have done the opposite.
You say the same error occurs but have never said what that error is.
It really isn't clear to me what you want to do and why. Nor what your issue is.
Perhaps someone else will be able to assist if you explain your issue clearly and in full.
I think you want to do away with this entire navigation display at the bottom of the form by setting Navigation Buttons = NO.
Then provide your own customized First, Next, Prior, Last buttons as well as your current New Record button.
Yes, It could be a solution for my problem. But, is there a possibility of recreation the record counting?
Yes! that´s what I want. Could you provide me an example, please?
Create 4 buttons: cmdFirst, cmdNext, cmdPrev, cmdLast
Use code similar to that in the attached text file for those buttons
You also need a label for the record counter - mine is called lblPos.
The code to update that is part of the Form_Current event
I've included code for that in the text file
Adapt as necessary
Hope that helps
Thank you so much for your reply!
Oh, sorry but Access does not recognize (maybe because it is in spanish) in my code the following part:
Me.lblPos.Caption = Me.CurrentRecord & " of " & N
Writing this line with this structure seems like it does not work.'
Any idea?