PC Review


Reply
Thread Tools Rate Thread

Dlookup to compare two values?

 
 
New Member
Join Date: May 2011
Posts: 1
 
      23rd May 2011
I have a junction table that is updated through a subform. Its a signup sheet for hour blocks of time and date. I want to stop a person from signing up twice for the same hour block.

The table is tblSignup, the PK is idsignup. The two FK fields fields to examine would be idEmpTbl and idHours.

If there is a duplicate in that table it would have identical idEmpTbl value and an identical idHours value.

In case this is more clear, a sample below.

tblSignup
idSignup = 81 (PK field, autonumber)
idEmpTbl = 7053 (fk to employee table,unique number)
IdHours = 43 (fk to hour block available for signup, autonumber)

What I dont want to happen is:

idsignup = 82
idEmpTbl = 7053
idHours = 43

That would be the same person signing up for the same hour block twice. Where idEmpTbl AND idHours already exists, its okay for many instances of idEmpTbl of the same value to exists as long as it doesnt have the same idHours value.

My question is forming the Dlookup to compare the value when, I think, it hasnt yet written the idHours to the table yet because this will be in the before update event on the forms subform.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dlookup compare date values niuginikiwi Microsoft Access Form Coding 8 29th Jun 2009 10:07 PM
compare multiple values in one cell to a range of values in multiplecells? hfx.selling Microsoft Excel Worksheet Functions 4 1st Nov 2008 09:01 PM
Excel Compare values in columns & display missing values in a new =?Utf-8?B?Y3BldHRh?= Microsoft Excel Misc 1 2nd Apr 2005 05:51 AM
Acc2003/XP: DLookup to compare before update Oz Skull Microsoft Access Form Coding 5 30th Jan 2005 01:05 AM
How do i compare values from two sheet and copy & paste if values match? =?Utf-8?B?cm96Yg==?= Microsoft Excel Programming 0 5th Mar 2004 12:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:42 PM.