使用VB防止访问中的记录重复! [英] Prevent Duplication Of Records In Access With VB!

查看:85
本文介绍了使用VB防止访问中的记录重复!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的访问表日期,typeofexpenses,discription,amount,paymentmode中有5个字段。现在的问题是我需要通过两个字段 - 日期和类型的费用来定义记录。如果用户尝试添加日期和typeofexpense字段与数据库中的特定记录一致的记录,则应显示msgbox。否则,如果仅发现日期或仅发现typeofexpenses字段,则应将该记录添加到数据库中。请帮助我获得一个解决方案,因为我在过去1周内一直在挖这个!!!!!!!

请回复某人!!!!!!!!!!! !

解决方案


我的访问表日期,typeofexpenses,discription,amount,paymentmode中有5个字段。现在的问题是我需要通过两个字段 - 日期和类型的费用来定义记录。如果用户尝试添加日期和typeofexpense字段与数据库中的特定记录一致的记录,则应显示msgbox。否则,如果仅发现日期或仅发现typeofexpenses字段,则应将该记录添加到数据库中。请帮助我获得一个解决方案,因为我在过去1周内一直在挖这个!!!!!!!

请回复某人!!!!!!!!!!! !





字段r date,typeofexpenses,discription,amount,paymentmode。

展开 | 选择 | Wrap | 行号


thanx dude,它真的很有用


实际上我有另一个记录集Exp添加我已在模块和连接数据库中定义它。所以我现在应该替换你的Exp和DB指定的rsTemp和connTemp。此外,我没有将我的记录集设置为ADODB.recordset,而只是将New Recordset设置为。


请解释!!!!!!!!!!!!!!!!!!!! !!!!!!!!!

I have 5 fields in my access table date,typeofexpenses,discription,amount,paymentmode . Now the problem is that i need to define a record by two fields-date and typeofexpenses. If the user tries to add a record which has both the date and typeofexpense field coinciding with a particular record in the database, then a msgbox should be displayed. Otherwise if only the date or only the typeofexpenses field is found coinciding, then the record should be added to the database. Pls Help Me Get A solution for this as i have been digging in this one for the past 1 week!!!!!!!
Please reply someone!!!!!!!!!!!!

解决方案

I have 5 fields in my access table date,typeofexpenses,discription,amount,paymentmode . Now the problem is that i need to define a record by two fields-date and typeofexpenses. If the user tries to add a record which has both the date and typeofexpense field coinciding with a particular record in the database, then a msgbox should be displayed. Otherwise if only the date or only the typeofexpenses field is found coinciding, then the record should be added to the database. Pls Help Me Get A solution for this as i have been digging in this one for the past 1 week!!!!!!!
Please reply someone!!!!!!!!!!!!

hi
the fields r date,typeofexpenses,discription,amount,paymentmode .

Expand|Select|Wrap|Line Numbers


thanx dude, it was really helpful


Actually im having another recordset "Exp" for adding which i have defined it in a Module and a connection DB. So should i now replace the rsTemp and connTemp that u have specified by my Exp and DB. Moreover i have not Set my recordset as ADODB.recordset but simply New Recordset.

Please Explain!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


这篇关于使用VB防止访问中的记录重复!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆