|
-
Oct 11th, 2005, 11:13 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Add values to combo list box
I have a combo list box that has two values 56 and 58. I want to write the look up like this:
VB Code:
SELECT DISTINCT [FC] FROM tblPSR;
but I want to be able to put new values in on the form also. Like 59 and 60. And when I put a new value I want it to be pulled up in my combo list box. I think my problem is the data isn't in there and it won't allow me to type it in the combo box on the form because it can't find it. How do I fix this??
Last edited by vonoventwin; Oct 11th, 2005 at 11:27 AM.
-
Oct 11th, 2005, 11:18 AM
#2
Re: Add values to combo list box
I'm confused.
 Originally Posted by vonoventwin
I have a combo list box that has two values 56 and 58. I want to write the look up like this:
VB Code:
SELECT DISTINCT [FC] FROM tblPSR;
This has nothing to do with a combo. It is a query run against your database, and I don't see code for doing anything for what you get back.
 Originally Posted by vonoventwin
but I want to be able to put new values in on the form also. Like 59 and 60. And when I put a new value I want it to be pulled up in my combo list box. I think my problem is the data isn't in there and it won't allow me to type it in the combo box on the form because it can't find it.
If the new items you want to add to your combo box aren't in your database, then no, you can't query the database and retrieve them. However, you can manually add them to your combo using the .AddItem method. In the same place you run your .Additem code, you could also run code to do an INSERT into your database so they would be there next time.
-
Oct 11th, 2005, 11:25 AM
#3
Thread Starter
Hyperactive Member
Re: Add values to combo list box
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|