Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation Before Record Update Help

Status
Not open for further replies.

azamusements

Technical User
Jan 7, 2007
1
US
Hello,

I have not used MS Access in over 6 years. I am in need of a custom application that schedules employees for multiple jobs. I do not want to go through the refiguring of modules to save records and query records so I have setup a database using the standard tables/queries.

My application has a main form for a party event. This form will have data of the customer such as name, date, city and time.

I have a sub forms that has several elements that if a person is scheduled for a particular element, that elemnt becomes visible. If no one is scheduled, then the subform is not visible.

In the visible subform, I have the employee linked to the eventid and event date.

I need to do a vailidation of the table that stores the employee information to see if this employee is already scheduled for this event or for another event in the same day so I do not double schedule.

I also have a confirmed check box on the subform when the employee commits to the job this becomes checkes. I have been able to successfully search the records before an update and Catch a duplicate scheduling but it is when I confirm that job after the check box is checked or uncheck that the validation finds the one instance of the employee as a duplicate and fails the validation.

Is it possible for someone to help me fine tune this so it works?? I have been working on this routine for a week and now I am very frustrated because I am so close. The logic of the code could be better but please keep in mind that I am not an expert by far and know enough to get in trouble...

The elements of my tables are

Main Form EventInfo:
EventID
EventDate
Event City
Event Time
Customer Name

Sub Form RouletteDealers:
EventID
Event Date
Customer Name
Dealer Name
Confirmed

Relationship is one event record to many dealer records with EventID in Mainform as a Primary Key.

Any Help would greatky be appreciated!!

Thanks.
 
Please post the Before Update code and the Checkbox code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top