text boxes value?

key

Registered User.
Local time
Today, 08:00
Joined
Jun 19, 2002
Messages
45
Hi All,

I'm stuck with the following problem:
I've got two forms. On form1 are 12 buttons (for each month), if the user clicks on one of them, form2 opens and a text box shows the chosen month.
Now, I've a list box (form2) and want to show records for the chosen month. Using the query builder (raw source) and referring to the text box doesn't work....
What I'm doing wrong?

Thanx,

Key
 
Select

it is a select statement (Select Amount From table where month = me!txtMonth.value)

if I use the 'lstListbox.requery' eg. it works, but I don't want to let the user click on the button to see the results...
AND on form_open the listbox.requery doesn't work...
 
In the afterupdate event of txtMonth

Private Sub txtMonth_AfterUpdate()
lstListbox.RowSource="Select Amount from YourTableName where YourTableName.month = '" & me!txtMonth & "';"
lstListbox.requery
end sub
 
I'm not at the moment offering a solution, but I will offer this comment, Key.

When you say "doesn't work" you need to tell us more. Like "Gives error message." "Gives no records." "Gives wrong records."

We like helping people but when it gets to be like pulling teeth, it is no fun for anyone.
 

Users who are viewing this thread

Back
Top Bottom