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

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 1534
Not a macro. Set up a referential integrity constraint in the references
window.

"DS" <bo******@optonline.net> wrote in message
news:gc********************@news4.srv.hcvlny.cv.ne t...
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******@optonline.net> wrote in message
news:gc********************@news4.srv.hcvlny.cv.ne t...
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******@optonline.net> wrote in message
news:gc********************@news4.srv.hcvlny.cv.ne t...
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******@optonline.net> wrote in message news:<gc********************@news4.srv.hcvlny.cv.n et>...
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******@optonline.net> wrote in message
news:S1*********************@news4.srv.hcvlny.cv.n et...
Alan Webb wrote:
Not a macro. Set up a referential integrity constraint in the references
window.

"DS" <bo******@optonline.net> wrote in message
news:gc********************@news4.srv.hcvlny.cv.ne t...
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
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...
7
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
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...
3
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...
5
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...
14
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...
6
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,...
4
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. ...
8
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...
3
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: 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
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
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
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...

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.