简体   繁体   English

MS Access-失焦计算

[英]MS Access - on lost focus calculation

I am working on MS Access database and creating a form in access. 我正在使用MS Access数据库并在Access中创建表单。

I have a field total_hrs. 我有一个字段total_hrs。 here I need help. 在这里我需要帮助。

I want to just fill minutes and it should be converted into hrs. 我只想填写分钟,应该将其转换为小时。

for that I am using onlost focus total_hrs 为此,我正在使用onlost focus total_hrs

you can use ABS(imin/60) to calculate the hours, where imin is int. 您可以使用ABS(imin/60)计算小时数,其中imin是int。

sub Calc

Dim iHrs as int
dim iMin as int

iHrs = ABS(iMin/60)

End sub

you can put this code after onlost fouce even or after even 您可以将此代码放在onlost fouce之后或什至之后

without looking at form or code it hard to help. 无需查看表单或代码就很难提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM