473,387 Members | 1,569 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,387 software developers and data experts.

Form for add new category

mseo
181 100+
hi,
I have developed a form for add new category using Ms-Access 2003 the first problem for me I got the error 3022 for no duplicating values and i have solved this one using this code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub CategoryName_BeforeUpdate(Cancel As Integer)
  2.  
  3.  Dim Answer As Variant
  4.  Answer = DLookup("[CategoryName]", "tbl_Category", "[CategoryName] = '" & Me.CategoryName & "'")
  5.  If Not IsNull(Answer) Then
  6.  MsgBox "Hi-Tech sysadmin reports that Duplicate Category Name Found, " & "Please press ok and try again. ", vbCritical + vbOKOnly + vbDefaultButton1, "Hi-Tech sysadmin, Duplicate Category Found"
  7.  Cancel = True
  8.  Me.CategoryName.Undo
  9.  End If
  10. End Sub
but after I used this i found that I can get record with its ID number but the category name is null
so I set the categoryname field to null
I got the same error of no duplicating when I use save plus the error of null valued how can make this form for adding new category integrated
it is now 12 days to trap this error
so if anyone could provide any help for solving this please submit
thank you in advance for any help you may provide me
Oct 26 '09 #1
2 1329
Delerna
1,134 Expert 1GB
http://bytes.com/topic/access/answer...or#post3521163


Identical question in 2 forums
Some possible answers are posted in the other post.
Oct 27 '09 #2
NeoPa
32,556 Expert Mod 16PB
Delerna is quite correct but I can understand why you may have done it that way. In future a better approach would be to post the question in one forum, then simply post a link to that question in the other forum. That way all answers are kept together.

I'm locking this thread now so any interested parties can offer help in the other thread.

Welcome to Bytes!
Oct 27 '09 #3

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

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
1
by: Dave Elliott | last post by:
I have a form named Add Products where I enter Products with a Category ID, Category Name & Category Description. I want the form to open showing only the records assocated with the Category Labor...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
2
by: rcmail14872 | last post by:
I have a form that lists several different categories for labels. I made a form that will let the user add a new category. On the Form the user can type in the name for the new category, then I...
19
by: Alex | last post by:
Hello list This question has probably already been asked, but let me ask again I have a mysql database to which I connect with my php scripts. The database contains articles. Name, Unit_Price...
2
by: RottNKorpse | last post by:
Well I am trying to make an admin section to allow my other admins of my site able to add content to my mysql database without giving them phpmyadmin access and without teaching them out to use it as...
14
by: Anja | last post by:
Hi everyone, I have a sub form that references a query to get the results. However, what I want to do is filter the results further based on a certain criteria. How can I tell the sub form to...
133
by: muhes | last post by:
Hello, I am working on a project for my department to design a form to calculate budgets. I really don't know much about access or programming in general. At this point, I am trying to design a...
19
by: Coward 9 | last post by:
HI, I saw in an example hello.aspx, there is a <form tagbeing used like <form runat="server> I search all html tag references and could NOT find "runat" attributes for <formtag. which...
3
by: underground | last post by:
I found this form on the scripts. However when I attemp to open the php file on the sever I get a error message Parse error: syntax error, unexpected $end on line 238 <? /** * Main.php * *...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.