query data into listbox? How?
I have a databse in access 2000. i'm running a query called mailinglist. It filters records and list clients according to my specs, that works fine.
Now on a form named mllist i have a command button called cmdmail & a list box called lstmail.
What i want to happen, is upon clicking cmdmail, it fills lstmail with the contents of the query. Below is the sql for the query.
I am totally lost and would appreciate any help.
------------------------------------------------------------------------------------
SELECT [Roll].[ContactID], [Roll].[LastName], [Roll].[FirstName], [Roll].[title], [Roll].[address], [Roll].[postal address]
FROM Roll LEFT JOIN [Find duplicates for Roll] ON [Roll].[address]=[Find duplicates for Roll].[address]
WHERE ((([Find duplicates for Roll].[address]) Is Null));
------------------------------------------------------------------------------------
How do i call the query from the button (I can do that) i just want to know about outputing it to the textbox.
All help appreciated.
It's just going to b one of those years...
Now I am as confused as a fat fish in the middle of a pond full of girraffes...:confused:
Hmmmm...very tired of the internet...
Errr...you can only add things to a list box by using code. There is no other way. I am lost in this thread, have no idea where it is going. What's all this [forms]![frmName]![cboName]* about?
Oh bugger. Hang on. Is the form in Access 2000 and are you using VBA? If so then I have no idea what you are on about, and I appologies for talking rubbish. :mad:
What's got 2 legs and bleeds in the middle?
1/2 a dog :p
BOOM BOOM, sorry, bored and tired.
1 Attachment(s)
Form filtering - simple example
Hi
Whipped this up in hmm 10 mins ish.
D/l and see if it work ok ?
Might give you some ideas - note had to use forms!frmname!txtfield.text to get it to register though
Vince