Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

additem to datacombo at runtime

Posted on 2004-03-27
1
Medium Priority
?
553 Views
Last Modified: 2010-05-18
I know that using a listbox or combo box I can add information at runtime such as additem.thisthing   but how would I do this using a DataCombo?
I am currently using a recordset to loop through fields in a table and this appears on a combo box. I also needed to add something at runtime and was able to additem so that it appears at runtime, but it's not stored in the database.

So how do you additem to a datacombo if possible?
I would need to see some code that can do this.
Thanks
0
Comment
Question by:mindserve
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 76

Accepted Solution

by:
David Lee earned 375 total points
ID: 10696812
Let me restate the problem to make sure I understand what it is you want.  You have a DataCombo control and you want to be able to add values to it at runtime and have those new values stored in the database that the DataCombo draws from.  Is that correct?  You also state that you've figured out a way to add a new item to the DataCombo control.  I'm not aware of any way to use AddItem with the DataCombo control so I'm guessing that you're setting DataCombo.Text to the new value.  Do I have that right?  Assuming I'm correctly understanding the issue, then this solution should do the trick.  Add a command button titled "Add" or "Add New" or something like that next to the DataCombo control.  There are then two ways to go.  One, you can have the Add button popup a dialog box and ask the user for the new value to add.  Two, you can have the user type the new value into the DataCombo and then click the Add button to add it into the database.  After adding the new value you should tell the DataCombo control to Refill itself to refresh its content.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question