Bob,
Is the label associated with the list box? or did you create them
separately.
If You created them separately, delete them and re-create them together
and
give the new ones the old control names.
Regards
Jacob
| Thanks Jacob, I worked for The list box but not the Label for the label
to
| appear and disappear I had to shut down the form Regards........Bob
|
| | > Oops again
(((
| >
| > .Requery not .refresh
| >
| > Regrads
| > Jacob
| >
| > | > | Hi Bob,
| > |
| > | Looks like I'm still rusty :-(
| > |
| > | Access is correct , LableNoClient is not a field - remove refrences
to
| > it -
| > | if you hide a field, its associated label wil be hidden too.
| > |
| > |
| > |
| > | Private Sub Form_Close
| > |
| > | If CurrentProject.AllForms("frmMain").IsLoaded then
| > |
| > | Forms("frmMain")("ListNoClient").Refresh
| > |
| > | '*** Deleted next 2 lines *****
| > | 'Forms("frmMain")("LableNoClient").Visible = _
| > | 'IIf(Forms("frmMain")("ListNoClient").ListCount = 0,
False,
| > | True)
| > |
| > | '**** Added '.Visible' below
| > | Forms("frmMain")("ListNoClient").Visible= _
| > | IIf(Forms("frmMain")("ListNoClient").ListCount = 0,
False,
| > True)
| > |
| > |
| > | End If
| > |
| > | End Sub
| > |
| > |
| > || Thanks Jacob, changed to requery, now I am getting an error:
| > || run time error 2465
| > || VRS cant find the field 'LabelNoClient' referred to in your
expression
| > || This is copied from the Name Field: LabelNoClient
| > || Thanks Bob
| > ||
| > ||
| > || | > || > Oops, sorry mate,
| > || > Also, change the "Refresh" to "Requery"
| > || >
| > || > Reagards/Jacob
| > || >
| > | > || > | Jacob I got this error closing my form Run Time Error 438
"Object
| > || > doesn't
| > || > | support this property or method" I added a couple of " that you
| > missed
| > || > in
| > || > | your code
| > || > | Regards Bob
| > || > | | > || > | > If I get you right, you may want to re-test visibility when
you
| > | return
| > || > to
| > || > | > frmMain. In this case use the Close Event of the form/s in
which
| > you
| > || > may
| > || > | > change data underling the list box i.e:
| > || > | >
| > || > | >
| > || > | > Private Sub Form_Close
| > || > | >
| > || > | > If CurrentProject.AllForms("frmMain").IsLoaded then
| > || > | >
| > || > | > Forms("frmMain")("ListNoClient").Refresh
| > || > | >
| > || > | > Forms("frmMain")("LableNoClient").Visible = _
| > || > | > IIf(Forms("frmMain")("ListNoClient).ListCount = 0,
| > False,
| > || > True)
| > || > | >
| > || > | > Forms("frmMain")("ListNoClient)= _
| > || > | > IIf(Forms("frmMain")("ListNoClient).ListCount = 0,
| > False,
| > || > True)
| > || > | >
| > || > | >
| > || > | > End If
| > || > | >
| > || > | > End Sub
| > || > | >
| > || > | > Regards/Jacob
| > || > | >
| > || > | >
| > || > | > || > | > | Just realized frmMain dose not actually close when you go
to
| > | another
| > || > | > form
| > || > | > so
| > || > | > | you cant requery the form because it is open, is that
| > || > | > right........Thanks
| > || > | > | Bob
| > || > | > |
| > || > | > || > | > | > Thanks Jacob it is a warning that shows on main Menu that
the
| > || > Horse
| > || > | > does
| > || > | > | > not have a Client, I have added the list box as well and
its
| > || > working
| > || > | > if
| > || > | > | > you close the form Main Menu down and reopen it...Thanks
Bob
| > || > | > | >
| > || > | > | > Private Sub Form_Current()
| > || > | > | > Me.LabelNoClient.Visible = IIf(Me.ListNoClient.ListCount
=
0,
| > || > False,
| > || > | > True)
| > || > | > | > Me.ListNoClient.Visible = IIf(Me.ListNoClient.ListCount =
0,
| > || > False,
| > || > | > True)
| > || > | > | >
| > || > | > | > End Sub
| > || > | > | > | > || > | > | >> Hi Bob,
| > || > | > | >>
| > || > | > | >> You cannot Requery a Label. What are you trying to do?
| > || > | > | >>
| > || > | > | >> Regards/Jacob
| > || > | > | >>
| > || > | > | > || > | > | >> | Good to hear from you Jacob thanks, Worked, and I did
a
| > | requery
| > || > for
| > || > | > the
| > || > | > | >> List
| > || > | > | >> | Box from the form that has the Clients on, but I cant
find
| > a
| > || > way
| > || > to
| > || > | > | >> requery
| > || > | > | >> | a label! the code only disappears if you reboot your
| > || > DB.....Thanks
| > || > | > Bob
| > || > | > | >> |
| > || > | > | >> | | > || > | > | >> | > Hi Bob,
| > || > | > | >> | >
| > || > | > | >> | > (Long time no speak
| > || > | > | >> | >
| > || > | > | >> | > If by "Is Null" you mean when the list is empty use
the
| > || > ListCount
| > || > | > | >> | > property:
| > || > | > | >> | >
| > || > | > | >> | > Me.lableNoClient.Visible= _
| > || > | > | >> | > IIf(Me.listNoClient.ListCount=0,False,True)
| > || > | > | >> | >
| > || > | > | >> | > If you mean nothing is selected, use the
IemsSelected
| > || > property:
| > || > | > | >> | >
| > || > | > | >> | >
| > || > | > | >> | > Me.lableNoClient.Visible= _
| > || > | > | >> | > IIf(Me.listNoClient.ItemsSelected.Count = 0,
False,
| > | True)
| > || > | > | >> | >
| > || > | > | >> | >
| > || > | > | >> | >
| > || > | > | >> | > Regards/Jacob
| > || > | > | >> | >
| > || > | > | >> | >
| > || > | > | >> | > || > | > | >> | > |
| > || > | > | >> | > |
| > || > | > | >> | > | I have a listbox on my form called [listNoClient]
and
| > a
| > || > label
| > || > | > | >> | > | [lableNoClient], I am trying to make the lable
| > Invisible
| > || > when
| > || > | > the
| > || > | > | >> list
| > || > | > | >> | > box
| > || > | > | >> | > | is Null, and Visible when the listNoClient Not
| > || > | > | >> | > | Null.....................Thanks for any
| > || > help................Bob
| > || > | > | >> | > |
| > || > | > | >> | > |
| > || > | > | >> | >
| > || > | > | >> | >
| > || > | > | >> |
| > || > | > | >> |
| > || > | > | >>
| > || > | > | >>
| > || > | > | >
| > || > | > | >
| > || > | > |
| > || > | > |
| > || > | >
| > || > | >
| > || > |
| > || > |
| > || >
| > || >
| > ||
| > ||
| > |
| > |
| >
| >
|
|