Issue with command button "Go to next record"

mari_hitz

Registered User.
Local time
Today, 05:24
Joined
Nov 12, 2010
Messages
120
Hi Guys!

hope you are fine. I have an issue with a data base that I have created. I have a form that is made based on a query. In this form I have put the command buttons "Go to next record" and "Go to previous record", however when I click on those buttons they do not go the next record or the previous instead they direct me to the same form with the fields in blanks.
The query is based on a table that has several information. Do you have any idea on why is this happening?

Thanks and warm regards!:)
 
Can we see the code behind the button? I think you should recreate the button and ensure you select the Go To Next/Previous Record button.

The button is going to a new record at the mo.
 
Hi! Thanks for your prompt reply. This is what I am referring to, and what appears in the button:

OnError Next
GoToRecord ,,Previous
[MacroError]<>0 MsgBox =[MacroError].[Description], Yes, None,

Hope this helps, in the command button it appears that as an "Embedded Macro".

Thanks!
 
Remove the Embedded Macro text from the property, click the elipsis button (...) and select Code Builder.

For the previous button put this:
Code:
DoCmd.RunCommand acCmdRecordsGoToPrevious

Next button use this:
Code:
DoCmd.RunCommand acCmdRecordsGoToNext
 

Users who are viewing this thread

Back
Top Bottom