List boxes

clauses

Registered User.
Local time
Today, 16:00
Joined
Feb 9, 2001
Messages
56
I have a listbox on my form that I want to fill and display based on the value entered in a text box. I wrote a query that gives me the correct date to display but when the form is selected I am prompted for the value before the form opens. How can I stop this from happening.
 
Can you leave the listbox unpopulated on loading the form, and only set the Row Source after the text box has been filled out?
Code:
Private Sub TextBox_AfterUpdate()
 If Not IsNull(TextBox) Then Me.ListBox.RecordSource = "QueryDef"
End Sub

Or something like that.
biggrin.gif


[This message has been edited by David R (edited 05-23-2002).]
 

Users who are viewing this thread

Back
Top Bottom