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

Popup if serialnumber already in table.

I have registration form, that you write serial number and so on.
But i will prevent the user from registrate same thing twice. So if the serialnumber already in the table, then a popup message will tell them so?
How is this possible? Use a invisible button that activate when they pusb enter.
Dlookup?
Help me :)
Mar 21 '07 #1
3 1300
MMcCarthy
14,534 Expert Mod 8TB
I have registration form, that you write serial number and so on.
But i will prevent the user from registrate same thing twice. So if the serialnumber already in the table, then a popup message will tell them so?
How is this possible? Use a invisible button that activate when they pusb enter.
Dlookup?
Help me :)
Go to the serialnumber field in the table. Set the Indexed property to Yes (No Duplicates). This will not allow the user to enter the same serial number twice.

Mary
Mar 21 '07 #2
Expand|Select|Wrap|Line Numbers
  1. Private Sub SjekkRekl_Click()
  2.  
  3. Dim db As Database
  4.     Dim swaptable As DAO.Recordset
  5.  
  6.    Set db = CurrentDb()
  7.  
  8.      Set swaptable = db.OpenRecordset("SWAPkeep", dbOpenDynaset, dbSeeChanges)
  9.  
  10.  
  11.     swaptable.FindFirst "Serienr = '" & frmSerienr & "'"
  12.  
  13.  
  14.     If swaptable.Fields("Serienr") = frmSerienr Then
  15.         MsgBox ("This serialnumber is already in the database.")
  16.         Else
  17.             DoCmd.GoToControl "status"
  18.         Exit Sub
  19.     End If
  20.     End Sub
Just for a little control message. In some few cases we have to use the same serialnumber twice.
But thanks for the answer :)
Mar 22 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
I'm glad you got it working.

Mary
Mar 22 '07 #4

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

Similar topics

2
by: Moon | last post by:
Seems I still haven't got the hang of all those window generating code in Javascript. I've got a page with about 15 photo thumbnails. When you click on a thumbnail a new window pops up which shows...
5
by: Obantec Support | last post by:
Hi i leached some code and strung together a popup i need for a page with 5 help buttons. Now i could use 5 scripts and pre-load the values but i would rather get a better understanding of how...
6
by: Stevie D | last post by:
Hi I'm a Javascript newbie I'm doing a 'simple' (basically adding pages and changing text in frontpage 2000) update of a web site for a friend - what I have done 'should not' have done anything...
6
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
3
by: clsmith66 | last post by:
I am building an ASP.NET application where I have been required to make all the editing screens popup windows within the application. I didn't have any trouble creating the new windows but only...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
0
by: wizardworkz | last post by:
Hello All! Having a bit of a problem combining php with javascript here. What I have is a store with images (There will be a smaller image of each item, and a larger image of each item, but I want...
4
by: jobs | last post by:
the javascript: function ShowTooltip(L1in) { document.getElementById("L1").innerText=L1in; y = event.clientY + document.documentElement.scrollTop; var Popup= document.getElementById("Popup")...
7
by: EManning | last post by:
I have an A2003 database linked to SQL Server 2005. My problem is with a popup form with a filtered table as a recordsource. I set the filter with an SQL statement like this: SELECT * FROM...
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:
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
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
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
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...
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.