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

Searching Date filed, numeric field & text field simulteneously

I have used mdb with 4 fields - rollno, name, date & attendance.
I have design a form for data entry by considering above fields.
I have connected it to DAO database object.

Suppose I have saved data with following values
roll = 1 & date = 15/12/2006
now, I want to write code which avoid duplicate entry i.e user could’nt save record with same values ie roll = 1 & date = 15/12/2006.
Dec 14 '06 #1
2 1288
sashi
1,754 Expert 1GB
I have used mdb with 4 fields - rollno, name, date & attendance.
I have design a form for data entry by considering above fields.
I have connected it to DAO database object.

Suppose I have saved data with following values
roll = 1 & date = 15/12/2006
now, I want to write code which avoid duplicate entry i.e user could’nt save record with same values ie roll = 1 & date = 15/12/2006.
Hi there,

TO be able to do that you need to make sure that data integrity is properly set, i.e. primary & foreign key. Have you set those keys yet? Kindly refer to below attached link for further reading & understanding, hope it helps. Good luck & Take care.

Data Integrity
Dec 15 '06 #2
Killer42
8,435 Expert 8TB
TO be able to do that you need to make sure that data integrity is properly set, i.e. primary & foreign key.
Hi umeshkakade.

What sashi says is true, but keep in mind that the database does not have to enforce these sort of rules. You can also do it in your code. This is obviously a less reliable way of going about it, but can still work.

Also, try looking up "unique" keys. Although Primary and Foreign keys are very important, it's the uniqueness which is the critical aspect in your case.
Dec 15 '06 #3

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

Similar topics

3
by: Stewart Allen | last post by:
Hi there I'm trying to find part serial numbers between 2 numbers. The user selects a part number from a combo box and then enters a range of serial numbers into 2 text boxes and the resulting...
1
by: Bruce Cushman | last post by:
My DB is Access 2000 based "possibly written in 2002" and I have to send and receive update files, ported to a UNIX server by FTP, DB unknown. The file content uses a fixed length string, zero...
3
by: Ivan V via DotNetMonster.com | last post by:
Dear All: I got a serious problem in updating the date field from vb.net to abd dbf file. My code is as follow: Dim ConnectionString As String Dim cake As Date = Date.Parse(idate) ...
5
by: mabond | last post by:
Hi Having trouble filling a datetime filed in SQL table with a value from an array. The original source is a comma-delimited text file where the date and time values are in two columns. I...
3
by: umeshkakade | last post by:
i have 4 fields in access database : rollno, name, date, fees i am writing code in vb. i want to find rollno, name & date through vb (simultaneously) & i want to display respective fees.
3
by: Savvas Tsitouridis | last post by:
Hello I have an Access database with a date field The format that we store values is dd/mm/yyyy (greek) The problem is that i can't retreive the correct dates because the queries return only...
3
by: Finn Stampe Mikkelsen | last post by:
Hi I have defined a table in my database, with 2 date-fields. I have set a default value to DBNull. I have integrated a nullable datetimepicker control to my project and set the apropriate...
2
by: GerryWiles | last post by:
I have adatabase which daily imports data from a spreadsheet to a named table. The spreadsheet contains one filed which is date AND time whereas in the table I have one field being date which is...
3
by: Ahmad Jalil Qarshi | last post by:
Hi, I have a text file having size about 2 GB. The text file format is like: Numeric valueAlphaNumeric values Numeric valueAlphaNumeric values Numeric valueAlphaNumeric values For example...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.