473,699 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

You can't go to the specific record - I want to display a different message

Hello!!!

Here is the thing.
I have had this problem and I want to address it now where in the next
and previous button DoCmd.GoToRecor d , , acNext - DoCmd.GoToRecor d , ,
acPrevious I wish the message that displays to the user when there is
no more record to got to was something different then **You can't go
to the specific record**
Has anyone ever changed to say something different?

Thanks
Simone
Nov 12 '05 #1
3 5714
Simone wrote:
Hello!!!

Here is the thing.
I have had this problem and I want to address it now where in the next
and previous button DoCmd.GoToRecor d , , acNext - DoCmd.GoToRecor d , ,
acPrevious I wish the message that displays to the user when there is
no more record to got to was something different then **You can't go
to the specific record**
Has anyone ever changed to say something different?

Thanks
Simone

I think you can trap this in the form's error event and sub your own
message. I assume the err nuimber is 2105 but if you step through the code
you can see what the value of DataErr actually is. Also if you're using a
command button for navigation you can place this in the error handling
section but instead check for the value of Err.number.
Private Sub Form_Error(Data Err As Integer, Response As Integer)

Select Case DataErr
Case Is = 2105
Msgbox "Listen up, there really aren't any more records to see."
Response = acDataErrContin ue
Case else
Response = acdataerrDispla y
End Select

End Sub


Nov 12 '05 #2
Thanks for you help.
I tried the code below and it didn't work, actually nothing happened.
The error number is 2105.
Please let me know if you have other ideas.

Thanks.
Simone

"Deano" <de*********@ho tmail.com> wrote in message news:<KC******* ***********@war ds.force9.net>. ..
Simone wrote:
Hello!!!

Here is the thing.
I have had this problem and I want to address it now where in the next
and previous button DoCmd.GoToRecor d , , acNext - DoCmd.GoToRecor d , ,
acPrevious I wish the message that displays to the user when there is
no more record to got to was something different then **You can't go
to the specific record**
Has anyone ever changed to say something different?

Thanks
Simone

I think you can trap this in the form's error event and sub your own
message. I assume the err nuimber is 2105 but if you step through the code
you can see what the value of DataErr actually is. Also if you're using a
command button for navigation you can place this in the error handling
section but instead check for the value of Err.number.
Private Sub Form_Error(Data Err As Integer, Response As Integer)

Select Case DataErr
Case Is = 2105
Msgbox "Listen up, there really aren't any more records to see."
Response = acDataErrContin ue
Case else
Response = acdataerrDispla y
End Select

End Sub

Nov 12 '05 #3
Simone wrote:
Thanks for you help.
I tried the code below and it didn't work, actually nothing happened.
The error number is 2105.
Please let me know if you have other ideas.

Thanks.
Simone
That probably means the error is not handled at the form level and you need
to trap it in the command button itself.

You need to step through your code by setting a breakpoint. See where the
error occurs then add an error handler.

In your event code you should set up some basic error handling structure. A
commonly used method is;

Private Sub Command0_click( )
On Error goto Err_Command0

'your code here

Exit_Err_Comman d0:
Exit Sub

Err_Command0:
Msgbox err.number & " " & err.description
Resume Exit_Err_Comman d0

End Sub
In your case simply put the following code first in the Err_Command0
section;

If err.number = 2105 then
Msgbox "Listen up, there really aren't any more records
Resume Exit_Err_Comman d0
End If


"Deano" <de*********@ho tmail.com> wrote in message
news:<KC******* ***********@war ds.force9.net>. ..
Simone wrote:
Hello!!!

Here is the thing.
I have had this problem and I want to address it now where in the
next and previous button DoCmd.GoToRecor d , , acNext -
DoCmd.GoToRecor d , , acPrevious I wish the message that displays to
the user when there is no more record to got to was something
different then **You can't go to the specific record**
Has anyone ever changed to say something different?

Thanks
Simone

I think you can trap this in the form's error event and sub your own
message. I assume the err nuimber is 2105 but if you step through
the code you can see what the value of DataErr actually is. Also if
you're using a command button for navigation you can place this in
the error handling section but instead check for the value of
Err.number.
Private Sub Form_Error(Data Err As Integer, Response As Integer)

Select Case DataErr
Case Is = 2105
Msgbox "Listen up, there really aren't any more records
to see." Response = acDataErrContin ue
Case else
Response = acdataerrDispla y
End Select

End Sub


Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6167
by: Shufen | last post by:
Hi, I'm a newbie that just started to learn python, html and etc. I have some questions to ask and hope that someone can help me on. I'm trying to code a python script (with HTML) to get values from a html form that consists of about 10 checkbox and a textbox where user have to key in a value to perform a search. From python tutors, I learned that I have to use the following method:
26
15247
by: Don | last post by:
I'm writing an html page with some JavaScript that reads a web page into a client-side temp file, then reformats it, then submits that same file as a URL to the browser for display, via "locate.replace". I can do all this if the html page containing the script originates on the client machine, but don't know how to get access to a client-side temp file when the same html page containing the script is on a web host. How do I get access...
2
8226
by: Terry Bickle | last post by:
Please forgive me for using the wrong term here or there. I'm an old Excel 4 macro guy who didn't convert to VB and I'm tinkering with an Access 2000 DB. I'm sure there is a simple Access 101 answer for this. I have a subform which the user selects an item description from a combo box from a table. I want to obtain the cost for the item (another field in the table) also. I've been able to produce the second data field by rewriting the...
4
5401
by: Mal | last post by:
I have an ACC 2000 database that has a strange behaviour I have a small table, with just a few fields... My report has very simple grouping and sorting, no code bar a NODATA event. I have a memo field When CAN GROW is set to NO everything works just fine. When CAN GROW is set to YES - watch out.... One record causes BIG
4
10645
by: the hotshot | last post by:
hello, this seems to be a hard question so far and noone has been able to help with this. is it possible to have access start an autonumber with a prefix according to the year when the data is entered. for example, if i entered something in 2004, i would like the number to bigin with 2004003, 2004004, 2004005... and same for 2005001, 2005002...? much and great appreciation for suggestions. thank you,
5
989
by: Jonathan Smith | last post by:
I am thinking about attempting a program to help my colleagues at school to write their pupil reports. Each report has two sections: a list of skills with a seies of tick boxes to show the level reached, and an area to write a comment underneath. Each subject is slightly different in the number of skills and their description and therefore the position of the eomment is slightly different. I realise that I can create different forms to...
7
11718
by: Bob Sanderson | last post by:
I have a php page which contains the code: echo "<tr>"; echo "<th>$JobNumber</th>"; echo "<td>$Description</td>"; echo "<td>$NSN</td>"; echo "<td>$Manufacturer</td>"; echo "<td>$PartNumber</td>"; echo "</tr>";
0
2420
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical price of a stock. The program will allow users to query the stock price of a particular date and output its statistics (mean price, median price and standard deviation) for any specified period. Your program must be menu driven and works as follows.
1
1563
by: ontherun | last post by:
Hi, I have found in one of the thread from Mccarthy, that access has the sound feature to tigger some action. Akin to my database, i want a pop-up menu with sound or something like that, to display a message "Record has been modified.Please inform the Accountant, if there is change in Total" whenever the user modifies or edit a particulat job record. i wanna display this messange in "Job" Form. Also, i need to display the last...
0
8691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8920
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7755
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6536
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.