Access Forms

G

Guest

This is going to have a simple answer (I hope)
Access 2003 in Access 2000 format
I have a form for entering timecard data. I am trying to minimize data
entry time for the user. I would like a couple of the fields (numeric type)
to have a default value equal to a previously entered field. Example: I
enter "8" in the "charged" field...I would then like the next field to
default to what ever number I entered into the "charged" field. The form is
based on a qry.

I am having trouble setting the default value for one field to equal the
value of another field.
 
D

Duane Hookom

Once a record is generated, it doesn't do any good to set a default value of
a field or control. You can write code in the after update of a text box to
set the value of another text box.

It is also raises a normalization red flag when you are entering numbers
across. I could be off base with this feeling.
 
G

Guest

Thanks for the response....Maybe I didn';t ask the right question. The idea
is that the [billed] text box will almost always be the same as the data
entered in the [charged] text box which is entered first. I simply want the
default value of the [billed] text box to equal the value of the [charged]
text box before the overall record is saved.
 
D

Duane Hookom

Maybe I didn't answer clear enough. Once you have entered a value into one
text box, the default value of another has no effect. You can use code in
the the After Update event of one text box to set the value in another text
box. For instance:

If IsNull(Me.txtBilled) Then
Me.txtBilled = Me.txtCharged
End If

--
Duane Hookom
MS Access MVP

tbudw said:
Thanks for the response....Maybe I didn';t ask the right question. The
idea
is that the [billed] text box will almost always be the same as the data
entered in the [charged] text box which is entered first. I simply want
the
default value of the [billed] text box to equal the value of the [charged]
text box before the overall record is saved.


Duane Hookom said:
Once a record is generated, it doesn't do any good to set a default value
of
a field or control. You can write code in the after update of a text box
to
set the value of another text box.

It is also raises a normalization red flag when you are entering numbers
across. I could be off base with this feeling.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top