By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,662 Members | 1,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,662 IT Pros & Developers. It's quick & easy.

Customize standardERR

P: 17
Hi there,

Everytime, when I create the Next and Previous buttons for rolling records in
Access form. When it reaches either to last or first record, there is a message pops up says "You cann't go to the Specified Record".

How can I change this message to:

1. "You come to last record" when I click the next button and come to last record

2. "You come to first record" when I click the previous button and come to the firs record.

Thank you in advance

Regards,
Dec 18 '07 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
1. "You come to last record" when I click the next button and come to last record

Replace current error routine with:
Expand|Select|Wrap|Line Numbers
  1. If Err.Number = 2105 Then
  2.    MsgBox  "You've come to the last record"
  3.    Resume YourExitRoutineNameGoesHere
  4. End If
  5.  
2. "You come to first record" when I click the previous button and come to the firs record.

Once again, replace current error routine with:

Expand|Select|Wrap|Line Numbers
  1. If Err.Number = 2105 Then
  2.    MsgBox  "You've come to the first record"
  3.    Resume YourExitRoutineNameGoesHere
  4. End If
  5.  
Linq ;0)>
Dec 18 '07 #2

P: 17
1. "You come to last record" when I click the next button and come to last record

Replace current error routine with:
Expand|Select|Wrap|Line Numbers
  1. If Err.Number = 2105 Then
  2.    MsgBox  "You've come to the last record"
  3.    Resume YourExitRoutineNameGoesHere
  4. End If
  5.  
2. "You come to first record" when I click the previous button and come to the firs record.

Once again, replace current error routine with:

Expand|Select|Wrap|Line Numbers
  1. If Err.Number = 2105 Then
  2.    MsgBox  "You've come to the first record"
  3.    Resume YourExitRoutineNameGoesHere
  4. End If
  5.  
Linq ;0)>

Thank you so much missingling.
Dec 19 '07 #3

P: 17
Thank you so much missingling.
Also, Can I ask one other question please?

I also would like to MsgBox: If a subformfield is greater than mainformfield then MsgBox.

Here is my code, but it doesn't work

Mainform Current Event:
If Forms!mysubform!txtstandingKIP > txtAmountAdv then
MsgBox ("The Value is greater than Budget")
Me.Forms!mysubform!OtherCurrency.SetFocus

End If
End Sub

Please advise, Thank you in advance

Regards,
Dec 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.