I suppose it depends on how the form is set up, but in general, the first
time you get a value of Allocated that's true, the Me.Job will get a value
assigned to it. That value will be used for subsequent entries, whether or
not Allocated is true.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Nikos Yannacopoulos said:
Doug,
I'm not following you. The way I understand the simple procedure I
suggested, Me.Job wouldn't be set if Allocated = False.What am I missing
here?
Thanks,
Nikos
Douglas J. Steele said:
You haven't actually specified what your problem is. In addition to what
Nikos has suggested, you probably need to put something in the Else
side
of
the If statement so that the value of Me.Job isn't set when Allocated is
False.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
The problem is in the control references.Try this:
Private Sub Allocated_AfterUpdate()
If Me.Allocated = True Then
Me.Job = Forms![Jobs Entry]![Job]
End If
End Sub
HTH,
Nikos
Private Sub Allocated_AfterUpdate()
If [Allocated] = True Then
[Job] = [Forms]![Jobs Entry]![Job]
End If
End Sub
Im trying to write a simple if statement, but cant get it to work, as
[Allocated] is a boolean. Is this possible? If so what is wrong
with
my