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

Find record with 3 values

reginaldmerritt
201 100+
I have a table (tbBookings) which holds three important bits of information about a Shift or Job. These are (dateofshift) (typeofshift) (staffbooked).

On a form i want to have an AfterUpdate event on the (staffbooked) field to lookup the tbBookings for any record which has the previously mentioned fields equal. In other words i need a away of checking that the (staffbooked) isn't doing the same (typeofshift) on the same (dateofshift).

I have been trying to use Dlookup but the fields have diffrent data types, so i'm having problems using this methord to find a record with all three values.

Any suggestions on how this can be done are more than welcome. Thanks
Dec 14 '07 #1
2 1253
Rabbit
12,516 Expert Mod 8TB
Can't help if we don't know what those data types are.
And is the form not bound to tblBookings? Why are they different data types?
I would use DCount rather than DLookup.
Just so you know, Access has a bunch of data type conversion functions.
Dec 14 '07 #2
reginaldmerritt
201 100+
Can't help if we don't know what those data types are.
And is the form not bound to tblBookings? Why are they different data types?
I would use DCount rather than DLookup.
Just so you know, Access has a bunch of data type conversion functions.
Ok thanks Rabbit. I check out Dcount and give it a try, if i have any problems i'll be back.
Dec 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mansoor Azam | last post by:
I have 2 tables say table1 and table2 with the same structure. Each record is identified by a field 'SerialNo'. Now there should be a total of 500000 records in both tables with serialno from 1 to...
8
by: Mark | last post by:
When my form goes to a new record, I have a procedure that copies the last record added to the form's underlying table into the form. The intent is that a series of new records may have the same...
1
by: ron.vdm | last post by:
Hi all. I have a SQL question I am having trouble with. We have a table, with a column that contains a code. These codes start at '00001', '00002', '00003', '00004'... and so on. If the record...
12
by: TS | last post by:
If I was to have my biz layer ask the data layer to load a particular object based on key field info i pass to it, and it cannot create the object becaues it isnt' in the Db, should the data layer...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
1
by: aknoch | last post by:
My basic situation is this - I ONLY want duplicates, so the opposite of DISTINCT: I have two tables. Ordinarily, Table1ColumnA corresponds in a one to one ratio with Table2ColumnB through a...
6
by: nickvans | last post by:
Hi all, I have a table called tblRecords that has "DashNum" as its primary key. The lowest value of this table is 116 and the highest value is 269, though there are some missing values. It is...
11
by: jennifersalcido | last post by:
Hello All, I am working with two tables that contain inventory data: 1) INVENTORY contains item_number, description, etc. This data is relatively straight-forward, one record per item_number....
14
by: lee | last post by:
hi, i have a dictionary as follows : kev : {'phno': , 'email': , 'name': , 'address': } if user is enters the 3rd item of key phno, ie "dfsdf" in my dict, how can i find it is the third item...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.