Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i want to take data from a combobox and write to access

Status
Not open for further replies.

mrmotocross

Programmer
Oct 6, 2004
13
US
hello everyone, i have a small problem that i'm sure most of you can help me with. I have a combobox that the user can enter new data in the text area. I know how to add the new entry to the combobox but how do i take the new data and write it to the file that populates the combobox so that next time it shows up in the combobox? Any help would be appreciated. Thanks much, bob mx125 #249
 
How are you populating the ComboBox??

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
mrmotocross,

You don't mention it in the body of your message but the title seems to indicate that you are using the MS Access database. If this is true then I assume you have some connection to this database over which you can execution a SQL command to INSERT or UPDATE records.
 
Hello, i am populating the combobox from an access 2000 database table. I really just need to know how to access the data in the combobox in order to write the new records back to the database table. Anyone have a routine?
 
You still need to answer the question that HarleyQuinn asked! Is it a bound control, is it bound to a table or to a query, is it manually populated via ADO and a SQL query, or DAO or what?

Please read faq222-2244 (as previously suggested in this thread and in your previous questions) so that you can ask questions in a way that we can answer best

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Use an Insert query:

INSERT INTO myTable
(stringfieldname1,numericfield2)
VALUES ('String for this field', 29.99)

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
strSQL = "INSERT INTO myTable (stringfieldname1,numericfield2) VALUES ('String for this field', 29.99)"
myConnection.Execute strSQL

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Sorry hit Post instead of edit...

It's the Execute Method of the ADO Connection Object

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top