Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Private Sub Form_Current()

Status
Not open for further replies.

KUZZ

Technical User
Aug 13, 2002
254
0
0
GB
CAN SOMEBODY TELL ME WHY THIS WON'T WORK, PLEASE!

Private Sub Form_Current()
If [FLAG] = 1 Then
Command35.Enabled = False
Frame49.BackColor = 255
Else
Command35.ForeColor = 0
Command35.Enabled = True
Frame49.BackColor = 65280

End If
If [Frame59] = 0 Then
[PRPIC].Visible = False
Else:
[PRPIC].Visible = True
End If
End Sub REGARDS, KUZZ

LIFE IS GREAT WHEN THERE IS SOMEONE TO HELP YOU.
DESIGNING DATABASES SINCE 2002
 
IT SAYS METHOD OR DATAMEMBER NOT FOUND REGARDS, KUZZ

LIFE IS GREAT WHEN THERE IS SOMEONE TO HELP YOU.
DESIGNING DATABASES SINCE 2002
 
what line does it highlight in the code window if you press debug??

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
KUZZ,

Try using Me.FLAG.Value = 1 and the same for Frame59 also get rid of the brackets. It sounds like Access is not recognizing those fields to that form. Hope this helps also put Me. in front of the visibles too. This should work because the code looks right in the first part however the second seems wrong.

'change to

If me.Frame59.value = 0 Then
me.PRPIC.Visible = False
Else 'got rid of :
me.PRPIC.Visible = True
End If


Tofias1
 
[PRPIC].Visible = False

starting from . till = REGARDS, KUZZ

LIFE IS GREAT WHEN THERE IS SOMEONE TO HELP YOU.
DESIGNING DATABASES SINCE 2002
 
ok, what is PRPIC??

Make sure it's not a label, and that it's a control name...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
prpic is a picture control

i found the problem,

prpic was in an initially ubound control named pic
so it could not see it

i put the prpic control directly from the field list, and now it works

thank you everyone for your promptness REGARDS, KUZZ

LIFE IS GREAT WHEN THERE IS SOMEONE TO HELP YOU.
DESIGNING DATABASES SINCE 2002
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top