473,394 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Editing Labels

53
HI, its me again this time a really short question
how do you enable when making a order in the sub form called “all customer order details sub form” alter the error message when you put the same product in the same order.

currently in the all customer order details sub form”, i am mot allowed to enter products in twice for one order which is great. however the error message is automatic, and i want to edit this.
Have you got any tips, it will be much apreciated
thank you
Feb 6 '07 #1
4 1646
ADezii
8,834 Expert 8TB
HI, its me again this time a really short question
how do you enable when making a order in the sub form called “all customer order details sub form” alter the error message when you put the same product in the same order.

currently in the all customer order details sub form”, i am mot allowed to enter products in twice for one order which is great. however the error message is automatic, and i want to edit this.
Have you got any tips, it will be much apreciated
thank you
If I follow your logic correctly, you wish to replace the Standard Acces Error message with a custom one of you choice and not display the generic one from Access. To accomplish this, you must place code in the Form's Error() Event and place the proper value in the Response parameter.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Error(DataErr As Integer, Response As Integer)
  2.     Const conDuplicateKey = 3022
  3.     Dim strMsg As String
  4.  
  5.     If DataErr = conDuplicateKey Then
  6.         Response = acDataErrContinue
  7.         strMsg = "Each employee record must have a unique " _
  8.             & "employee ID number. Please recheck your data."
  9.         MsgBox strMsg
  10.     End If
  11. End Sub
Feb 7 '07 #2
panjap
53
If I follow your logic correctly, you wish to replace the Standard Acces Error message with a custom one of you choice and not display the generic one from Access. To accomplish this, you must place code in the Form's Error() Event and place the proper value in the Response parameter.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Error(DataErr As Integer, Response As Integer)
  2.     Const conDuplicateKey = 3022
  3.     Dim strMsg As String
  4.  
  5.     If DataErr = conDuplicateKey Then
  6.         Response = acDataErrContinue
  7.         strMsg = "Each employee record must have a unique " _
  8.             & "employee ID number. Please recheck your data."
  9.         MsgBox strMsg
  10.     End If
  11. End Sub
thank you for your help, i sucessfully applied this.
thank you so much, i was really struggling on this, much appreciated
cheers
Feb 7 '07 #3
ADezii
8,834 Expert 8TB
thank you for your help, i sucessfully applied this.
thank you so much, i was really struggling on this, much appreciated
cheers
No problemo.
Feb 7 '07 #4
NeoPa
32,556 Expert Mod 16PB
I didn't know that ADezii - Nice one :)
Feb 9 '07 #5

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

Similar topics

2
by: DBQueen | last post by:
I have a database which will be printing out labels for SMALL test tubes (1/4" high). We have yet to find a reasonably-priced printer (labelwriter) which can effectively print this on ROLLS of...
6
by: DebbieG | last post by:
I am creating a database for a small department in a university. Each student in their database can have 2 mailing addresses. They wanted mailing labels pulling just the 1st address. No problem....
3
by: Grim Reaper | last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a week. I have been having problems with one thing since I have been printing mailing labels. I print mailing labels by...
3
by: Grim Reaper | last post by:
I know this is probably an easy question, but I could not find/figure it out. Basically, I am printing mailing labels with a "Sorting/Grouping" section that groups the label types together....
1
by: Sam | last post by:
I'm having problem. I want to have a block of code run, after a user edits the label of a node, so I put the code in the event method of the afterLabelEdit event. The problem is that this code is...
0
by: Evan Delodder | last post by:
I am trying to edit form elements (labels, text box's, etc) in Visual Studio.NET using VB.NET. Whenever I edit certain forms’ appearance whether it is through the code, or through the designer, I...
6
by: Ron | last post by:
Hi, I know Access allows for easy construction of a report setup to print labels from a table/query, etc. I've done that one. It works pretty well for what I need. However, is there an...
0
by: HP | last post by:
Hi there I have a datalist control with some bound controls in its Item Template and a gridview bound to one of those fields (residing also in Item Template). I've found out that when I click...
0
by: geeteshss | last post by:
hello guys thanks for the previous reply now my problem is that i want to display the data in the datagrid from database also i want to edit the data in the datagrid but it is also not providing an...
0
by: xikom01 | last post by:
In this age, there is a lot of focus on the importance of "getting organized." There are even professional organizers for hire! Labels are a huge presence in the field of organization, because they...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.