Text boxes following to new record (1 Viewer)

anthonyphillips

Registered User.
Local time
Today, 00:28
Joined
Nov 7, 2007
Messages
50
Hi All

I have a very simple database to record mileage and work times etc.

I have set up 3 text boxes, one is to enter start time and the other is to enter finish time, the in sequence the 3rd box gives me the difference between then using =Val([Text48]-[Text46]).

This all works fine except when i move onto the next record the text boxes from the previous record are still showing!!

Question!

How do i make the text boxes show empty for new records?

Many thanks and a merry christmas to all

Anthony
 

ted.martin

Registered User.
Local time
Yesterday, 23:28
Joined
Sep 24, 2004
Messages
743
Assuming you are using a form, is the Default View set to Continuous. If you change it to Single Form; hopefully that will give you the view you require.
 

anthonyphillips

Registered User.
Local time
Today, 00:28
Joined
Nov 7, 2007
Messages
50
Assuming you are using a form, is the Default View set to Continuous. If you change it to Single Form; hopefully that will give you the view you require.

This only changes the amount of forms shown on the page.

What is happening is when i enter values in time format 07:00 with the text box format set to short time the equations work fine, the problem is that when i then go to a different day (record) the values from the previous record follow, then if i change the values on the next record it changes the values on all records including the first record !!

This is what happens when you work for a company that wont let you have a sql server and demands that all databases are kept within the confines of Access.
 

missinglinq

AWF VIP
Local time
Yesterday, 19:28
Joined
Jun 20, 2003
Messages
6,423
This has nothing to do with your company not letting you have a sql server! There are hundreds of thousands if not millions of apps running entirely "within Access" just fine!

A textbox that retains its previous value, when moving to a new record, is an unbound textbox! The only exception to this would be if you had intentionally written code to cause this to happen with a bound control, by assigning the current value (in the control's AfterUpdate event) to the control's Default Value. While this is frequently done in this type of database, to reduce input time, I assume it's not the case here, since you say that you created the db.
 

Dreamweaver

Well-known member
Local time
Today, 00:28
Joined
Nov 28, 2005
Messages
2,466
This only changes the amount of forms shown on the page.

What is happening is when i enter values in time format 07:00 with the text box format set to short time the equations work fine, the problem is that when i then go to a different day (record) the values from the previous record follow, then if i change the values on the next record it changes the values on all records including the first record !!

This is what happens when you work for a company that wont let you have a sql server and demands that all databases are kept within the confines of Access.

Sounds a dream job to me no Problems with server admins to have to listen to moaning about access where do I sign up LOL

Agree totally with missinglinq bind the fields and problem goes away.

Mick
 
Last edited:

ted.martin

Registered User.
Local time
Yesterday, 23:28
Joined
Sep 24, 2004
Messages
743
Assuming Missingling is correct, which she may well be, you will need to set the time textbox to "" or Null following some event.
 

Users who are viewing this thread

Top Bottom