473,698 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Verifying Employees

DS
How does one set-up a macro to do the following. When you enter an
Employee Number in a log-in box Access checks the Employee Table to see
if thats a valid Employee number. if it is the Macro continues along
its way, if not it gives a message box saying that "This is not a valid
Employee ID"
DS
Nov 13 '05 #1
5 1551
Not a macro. Set up a referential integrity constraint in the references
window.

"DS" <bo******@opton line.net> wrote in message
news:gc******** ************@ne ws4.srv.hcvlny. cv.net...
How does one set-up a macro to do the following. When you enter an
Employee Number in a log-in box Access checks the Employee Table to see if
thats a valid Employee number. if it is the Macro continues along its
way, if not it gives a message box saying that "This is not a valid
Employee ID"
DS

Nov 13 '05 #2
DS
Alan Webb wrote:
Not a macro. Set up a referential integrity constraint in the references
window.

"DS" <bo******@opton line.net> wrote in message
news:gc******** ************@ne ws4.srv.hcvlny. cv.net...
How does one set-up a macro to do the following. When you enter an
Employee Number in a log-in box Access checks the Employee Table to see if
thats a valid Employee number. if it is the Macro continues along its
way, if not it gives a message box saying that "This is not a valid
Employee ID"
DS


Thank You for the Response. How is this done? I can't seem to figure
this out, Once again Thank you.
DS
Nov 13 '05 #3
DS
Alan Webb wrote:
Not a macro. Set up a referential integrity constraint in the references
window.

"DS" <bo******@opton line.net> wrote in message
news:gc******** ************@ne ws4.srv.hcvlny. cv.net...
How does one set-up a macro to do the following. When you enter an
Employee Number in a log-in box Access checks the Employee Table to see if
thats a valid Employee number. if it is the Macro continues along its
way, if not it gives a message box saying that "This is not a valid
Employee ID"
DS


PS the field that the ID Numbers are typed into is an unbound field that
sends the number to a record in another form. A default message comes
up from Microsoft that I really don't want so I guess its kind of
working. I just want it to be cleaner and slicker. Thank you once again.
DS
Nov 13 '05 #4
DS <bo******@opton line.net> wrote in message news:<gc******* *************@n ews4.srv.hcvlny .cv.net>...
How does one set-up a macro to do the following. When you enter an
Employee Number in a log-in box Access checks the Employee Table to see
if thats a valid Employee number. if it is the Macro continues along
its way, if not it gives a message box saying that "This is not a valid
Employee ID"
DS


Never use Macros, but you could do something like use DCount and pass
in the Employee's ID number. If it returns 1, it's valid, and zero if
it's not.
Nov 13 '05 #5
DS,
I am fishing because I don't know enough about the specific Access
application you support. But constraints are a standard part of the design
of the database. You enable them by establishing relationships between
tables in Access and then enabling referential integrity for the
relationship. Check out the help files on Relationships as a start.
As for trapping error messages generated by Access this can be simple or it
can be complex. Initially you need to create code in VB which will catch
the error when it occurs and substitute your message for the one Access
generates. Before I changed careers and returned to being an amatuer
programmer instead of a paid one I had my own event trapping code that used
a table which listed all the error codes with my own error messages. This
way I could change the error messages to suit the customer.

"DS" <bo******@opton line.net> wrote in message
news:S1******** *************@n ews4.srv.hcvlny .cv.net...
Alan Webb wrote:
Not a macro. Set up a referential integrity constraint in the references
window.

"DS" <bo******@opton line.net> wrote in message
news:gc******** ************@ne ws4.srv.hcvlny. cv.net...
How does one set-up a macro to do the following. When you enter an
Employee Number in a log-in box Access checks the Employee Table to see
if thats a valid Employee number. if it is the Macro continues along its
way, if not it gives a message box saying that "This is not a valid
Employee ID"
DS


PS the field that the ID Numbers are typed into is an unbound field that
sends the number to a record in another form. A default message comes up
from Microsoft that I really don't want so I guess its kind of working. I
just want it to be cleaner and slicker. Thank you once again.
DS

Nov 13 '05 #6

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

Similar topics

4
2736
by: Michael | last post by:
I'd like to write a program to verify the consistency between various database replicas in our environment. The rules are as follows: - I'm given two servers, each with a database - I don't know the schema of the database - The databases are large (some tables with 10,000,000+ rows) What would be the best way to perform a pretty-good-guess analysis of whether or not these two databases were in sync?
7
1371
by: JP SIngh | last post by:
Hi All I have a table which stores the employee details. The format of the table is below EmpNo _ Integer FirstName - Text Lastname - Text ManagerNo - Integer
9
2101
by: Carter Smith | last post by:
http://www.icarusindie.com/wiki/index.php/Server-Side_Javascript_Check Sample source included This method requires that your pages are PHP enabled and you have mySQL. Although I suppose you could also use PHP sessions (not cookies as they're client editable). You could actually use any server side scripting language such as Perl or ASP and any database like MS SQL Server. I prefer PHP and MySQL.
3
1601
by: Eddie | last post by:
Hi to all I am building a database to track project expenses information. My database has 4 main tables, Employees, Activity, project info and rates. We add a project and track activities on the project. Each employee will add an activity on a certain date. What I need to do is check the date the activity was added and then check what the rate is that employee was paid during that period.
5
4015
by: Geisler, Jim | last post by:
So, as far as I know, PostgreSQL does not have any way of verifying the loss of referential integrity. Are there any recommended methods or utilities for checking referential integrity in a PostgreSQL database?
14
5919
by: Jim Andersen | last post by:
I have a problem with this standard employee-supervisor scenario For pictures: http://www.databasedev.co.uk/self-join_query.html I want to show all employees "belonging" to a specific supervisor. E.g, EMP1 and EMP2 both has the same supervisor SUP1. EMP3 has a supervisor SUP2. EMP4 has supervisor SUP3.
6
6663
by: Christopher Lusardi | last post by:
How can I fix this? When I do the below I get the error message: "Cannot insert explict value for identity column in table 'Employees' when IDENTITY_INSERT is set to OFF." To get this message, I click the Add button to add a new row to the database, and then I click the Update button to save the new database to the external memory. The methods I used are below.
4
3401
by: shelley_2000 | last post by:
What is the best approach to collect and load Employee Resume Data from External Employees who may not have Microsoft access? If is likely they will have Microsoft Word, but not Microsoft Access. Is there any type of form/template that I could send to employees to fill out and send back for me to import into the Access Database? Or should I consider a Word Forms with some type of data extractor for loading into Access database? and if...
8
1650
by: Petar | last post by:
I was just wondering. What if you have a 'Employees' class and you want to list all the employees. Currenlty i'm seeing to possibilities: - create a 'listAll' function inside the class which returns all the employees in a array. - create multiple instances, putting them in a array, by calling the Employees class multiple times in a loop (thus not creating a listAll function in the class).
3
8412
by: lizBeth | last post by:
Hi all, i seem to have gotten stuck on this coursework, i am unsure as to how to implement a method in the main class to calculate the sum of all employees monthly salaries. Everything else works on the program it does output the employees details and their monthly salaries. I just need to add them up and output a "Total Payroll: xxxxxx.x " in this format. It sounds simple and it probably is simple, i think i can't see the woods for...
0
8683
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
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8901
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
7739
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
6528
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
4371
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...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
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.