L
Lori
I need help! I have a field called "Benchmark descp" in a
subform which is linked to a main form. I want the descp
field to automatically update/fill with the descp. of a
field called "Stdr Desc" from the main form IF 2 things
are true, otherwise leave untouched. 1. If field "Select
sample benchmark?] " is true AND field "Benchmark descp"
is null. Basiclly if the field already has a desp, I don't
want to overwrite it. The below code works only if a
record already exists. I tab off of the check field and
desp field will update if null or leave alone if something
already there. BUT.... if a new record is being created,
it does not work(cause as you tab from the ck field, it's
like the desp field noesn't exist yet to varify) so it
doesn't fill. The below code is want I have in the got
focus field "Benchmark descp".
Private Sub Benchmark_descp_GotFocus()
' Copy "Stdr Descp". as "Benchmark descp" after ck is
selected as true and if Benchmark descp is null
If Forms![mainform]![subform].Form![Select sample
benchmark?] = True And Forms![ mainform]![ subform].Form!
[Benchmark descp] = "" Then
Forms![ mainform]![ subform].Form![Benchmark descp] =
Forms![ mainform].Form![Stdr Desc]
End If
End Sub
Thanks (e-mail address removed)12.WI.US
subform which is linked to a main form. I want the descp
field to automatically update/fill with the descp. of a
field called "Stdr Desc" from the main form IF 2 things
are true, otherwise leave untouched. 1. If field "Select
sample benchmark?] " is true AND field "Benchmark descp"
is null. Basiclly if the field already has a desp, I don't
want to overwrite it. The below code works only if a
record already exists. I tab off of the check field and
desp field will update if null or leave alone if something
already there. BUT.... if a new record is being created,
it does not work(cause as you tab from the ck field, it's
like the desp field noesn't exist yet to varify) so it
doesn't fill. The below code is want I have in the got
focus field "Benchmark descp".
Private Sub Benchmark_descp_GotFocus()
' Copy "Stdr Descp". as "Benchmark descp" after ck is
selected as true and if Benchmark descp is null
If Forms![mainform]![subform].Form![Select sample
benchmark?] = True And Forms![ mainform]![ subform].Form!
[Benchmark descp] = "" Then
Forms![ mainform]![ subform].Form![Benchmark descp] =
Forms![ mainform].Form![Stdr Desc]
End If
End Sub
Thanks (e-mail address removed)12.WI.US