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!

Need list box required if visible

Status
Not open for further replies.

hayde

Technical User
Feb 16, 2005
10
0
0
US
I have a listbox that is visible only when other criteria on the form is met. What I need now is a way to make it required to chose a line from the listbox when the listbox is visible. I'm drawing a blank on how to do this. Thanks.
 
In the method code where you make the listbox visible, add code to setfocus to it, ie.
Code:
WITH ThisForm.MyListBox
   .Visible = .T.
   .SetFocus()
ENDWITH
Then, in the Valid of your listbox, have something like this.
Code:
RETURN This.Selected
Regards,
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top