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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing and Storing Form Values in Table

Status
Not open for further replies.

cRODEEkrank

Technical User
Dec 5, 2001
41
US
Is there a way in Access 2000 to capture the value selected in a combo box and place it in a specified field within a table? I tried using the "SetValue" method but I keep getting an error.
 
Is the current form bound? is the combobox (cbo) bound?

the table/field that you want to put the information in, is it other than the bound table/field (if it is already bound)?

you could use a recordset, and use .addnew to get the information in there if the table you are putting the information in is other than that behind the form....

GComyn
 
Hi GComyn,

The form and combo box are bound to a table. However, the combo box has 2 columns and I would like to store information in both columns to the table. Currently I can only get it to save only one.

I've also tried using VB Code but Access 2000 uses different syntax. For example, you can't declare a variable and set it to type "database" (ex: dim dbMain as Database).
 
you can if you add the reference to DAO... I'm still using Access 97 at work, so on my Access2k databases at home, I still use the coding conventions for 97....

GComyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top