回到以前的记录 [英] Going back to previous record

查看:78
本文介绍了回到以前的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,


目前我正在创建一个小时的注册。假设我有一个表格< hour>在表格中我有两个字段:

1.< name>

2.< date> ;.


如果我输入名称和某个日期,如何创建一个vb代码,如果日期和名称与之前的记录匹配,它将返回到该记录?通过这种方式,用户可以更改/编辑之前的条目。


希望有人可以帮助我!

亲切的问候,

Frans

Dear all,

At the moment i am creating an hour registration. Lets say i have a form <hour> and in the form i have two fields:
1. <name>
2. <date>.

How can i create a vb code that if i enter a name and a certain date, that if the date and name match a previous record it will go back to that record? In this way users can change/edit there previous entries.

Hope someone can help me!
Kind regards,
Frans

推荐答案

您可以在任一控件的BeforeUpdate事件中搜索。
You can search in the BeforeUpdate event of either control.


*因此,当您第一次打开表单时,这两个字段都是空的。

*如果姓名&日期存在goto记录..

* else ....(如果记录中不存在姓名和日期你做了什么?

1.clear everythig?

2.在记录中插入姓名和日期?

3.弹出消息说没有找到匹配的记录?


什么你想做什么?


您可以在表单上创建一个按钮,并使用此按钮的On_click事件搜索匹配的记录并显示它。

注意:您可以在VB中使用 recordest 直接处理记录。


那里的一些见解

欢迎到字节
*So when you first open the form both fields are empty.
*if name & date exist goto that record..
*else....(if the name and date do not exist in record what do you do?
1.clear everythig?
2. Insert name & Date into record?
3. Pop up message saying no matching records found?

What do you want to do?

You can create a button on the form and use the On_click event of this button to search for the matching records and display it.
NB:You can use recordest in VB to deal directly with records.

Some insights there

Welcome to Bytes


当表单打开时,有两个空白字段:name& date。

我想要做的是:如果输入的名称和日期组合等于前一记录中给出的名称和日期组合,而不是转到该记录。
When the form is opened there are two blank fields: name & date.
What i want to do then is: If an entered name and date combination is equal to one given in a previous record, than go to that record.


这篇关于回到以前的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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