Reference subform field in main form code

K

Kirstie Adam

Hello All,

I have a bit of code that i use to change the colour of the form when a job
is completed (makes it easier to see when you scroll through each record)

Private Sub Form_Current()
If Me.Job_Complete = "0" Then
Me.Detail.BackColor = 13948116
Else
Me.Detail.BackColor = 13355960
End If
End Sub

This has worked fine, however i have just redesigned the database and now
the field [Job Complete] is no longer on the main form, and is on a subform
called "Job Status sbf".
How do i change my code to keep it working? I have tried a few things but
they never work.

Any help is much appreciated,

Kirstie Adam
 

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