If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back  dBforums > PC based Database Applications > Microsoft Access > Access 2010 Form Input Help

LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Registered User
Join Date: Dec 2012
Posts: 1
Access 2010 Form Input Help

I'm working on a database to keep track of Asset Protection violations at my company. I have a form with bound textboxes and combo boxes that include the date, officer reporting, employee's first and last name, employee ID, bulding, floor, cube number, violation type, and violation number in the form. What I'm looking to do, and I have not been able to find any information on this anywhere on the web is to have the results of the employee ID and violation type dictate what violation number one can enter. Basically if one enters the ID a123456 for the violation "unsecured product" and tries to enter 1st violation, but that is already in the databse, an error message pops up telling them to try another violation number before the record can be entered. Can anyone help me out on this? Once I figure this out, I can publish my database for my team to use.
Reply With Quote
  #2 (permalink)  
Registered User
Join Date: Oct 2009
Posts: 202
Write a query that looks up if there is a first violation and have it run on your form...probably after update of that field. If the result is positive, display a msgbox and clear the field - if not, let it accept.
Reply With Quote
  #3 (permalink)  
Jaded Developer
Join Date: Nov 2004
Location: out on a limb
Posts: 12,296
Consider making employee id and violation type the primary key.
Handle the error when some enters a row which violates that.
You could check ahead as soon as the user enters the employee id and violation type in the respective after update events for the controls
Is taking part in the 'Distinguished Gentlemans' ride. Being neither distinguished nor a gentleman, but I am keen to raise funds for Prostrate Cancer research. At present I'm threatening to ride a Norton 961 wearing a kilt. If you would like to contribute to Prostrate Cancer research then please consider donating via this page:-
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On