Hi, I have a form which contains 2 fields: Minutes and Hours.
User enter the minutes then it automatically convert the minutes in term of hour.
If I set the control source of field "Hours" to =[Minutes]/60, the data will not be saved. If I set the Control Source of field "Hours" to "Hours", the data are save to the table.
How could I solve the proble.
I would appreciate for any help. Michelle
9 2145
Hi, I have a form which contains 2 fields: Minutes and Hours.
User enter the minutes then it automatically convert the minutes in term of hour.
If I set the control source of field "Hours" to =[Minutes]/60, the data will not be saved. If I set the Control Source of field "Hours" to "Hours", the data are save to the table.
How could I solve the proble.
I would appreciate for any help. Michelle
Michelle
For adding new records the default value of the control being set to =[Minutes]/60 should solve your problem.
Otherwise you could put the following code in the After Update event of Minutes as follows: -
-
Private Sub Minutes_AfterUpdate()
-
-
Me.Hours = Me.Minutes / 60
-
-
End Sub
-
-
Mary
NeoPa 32,556
Expert Mod 16PB
Hi, I have a form which contains 2 fields: Minutes and Hours.
User enter the minutes then it automatically convert the minutes in term of hour.
If I set the control source of field "Hours" to =[Minutes]/60, the data will not be saved. If I set the Control Source of field "Hours" to "Hours", the data are save to the table.
How could I solve the proble.
I would appreciate for any help. Michelle
Bind the control (Set the Control Source to Hours) then in the AfterUpdate event of the Minutes control add some code : NeoPa 32,556
Expert Mod 16PB
Setting the Default value is probably easier :).
I'm off to bed (She keeps beating me to the post and sometimes they're even better answers :().
Bind the control (Set the Control Source to Hours) then in the AfterUpdate event of the Minutes control add some code :
Too late Ade.
I got there before you.
Notice how I'm making nonsense posts. :D
Mary
NeoPa 32,556
Expert Mod 16PB
Too late Ade.
I got there before you.
Notice how I'm making nonsense posts. :D
Mary
At 02:30 I didn't even notice the obvious :(.
Lol -Ade.
It works except that "Me.Hours = Me.Minutes / 60" doesn't give the correct hour.
If I have 66 minutes, it only gives me 1 hour. But with [Minutes]/60, I get 1.1 hour
Michelle
NeoPa 32,556
Expert Mod 16PB
It works except that "Me.Hours = Me.Minutes / 60" doesn't give the correct hour.
If I have 66 minutes, it only gives me 1 hour. But with [Minutes]/60, I get 1.1 hour
Michelle
I'm not sure which you're saying is the good one.
But if setting the Default value works - look no further.
I'm not sure which you're saying is the good one.
But if setting the Default value works - look no further.
Hi Ade
Sorted in separate post. Just had to change the number format of hours.
BTW Michelle,
Sorry I said data type instead of format in the other thread. Glad you got it sorted.
Mary
NeoPa 32,556
Expert Mod 16PB
Thanks Mary,
I saw the other post but didn't have time to 'moderate' it.
nvm - all sorted now.
Cheers -Ade.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jerry Hull |
last post by:
I've got a very simple database, with a report that the user wants to
be able to print for a single record immediately after entering the
data.
I've created a button on the data entry form that...
|
by: sparks |
last post by:
They have a new data collection station. The people here are using
access 97....
This third party site will only post data back to us when we do this.
...
|
by: Sally Ruggero |
last post by:
I need advice on archiving data from our production database.
Each night I would like to save and remove a day's data from two weeks ago, from all the tables. I know how to delete the...
|
by: tarafinlay |
last post by:
Hi all,
I am new to access and am finding it a bit unintuitive having worked
with SQL server in the past... And I am in a bit of a hurry because my
employer wants me to crank something out which...
|
by: sellcraig |
last post by:
Microsoft access
2 tables
table "data main" contains a field called "code"
table "ddw1" is created from a make table query of "data main"
Goal-
the data in "code" field in needs to...
|
by: amrhi |
last post by:
Hy Guys , Can anybody help me ?
I try to make small web database in my unit.
Some of fields have on change behaviour to get other data that automatically filled other text field. But when i try to...
|
by: Jacob Donajkowski |
last post by:
Once the user logs in I want to have the users switch from the Roster
View to the Profile View and enter their profile infomation and save
it. Then the next time they login and go to the Profile...
|
by: subhashkumar |
last post by:
Running data Append to a table
Dear All,
I need a help from this forum, I was developing a small tools for stock market.
I get stuck when trying to save the running changes in a data field...
|
by: rustyc |
last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-)
As I said over there:
... for a little side project at home, I'm writing a ham radio web site in...
|
by: semomaniz |
last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |