var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Unbound Combo.......Pls Help
I have unbound combo box on my frmMain. How can i save the value from unbound combo box to my table ?
I'm using tblLookUp for combo box and each time user selects the value from combo box i would like to save it in tblSection. tblSection and tblLookUP (1 to M)
Thanks In Advance
Last edited by SAK2004; 06-22-04 at 13:56.
The easiest way is to create an insert query and use the value in the combo box as the value to insert.
A more elegant way would be to create a recordset and insert it in programatically.
Can u give me an example or walk me thru it ?
I have never done this
Check out the "docmd.RunSQL" method in the help files. The following was taken from the help files.
Just build your SQL statement in VB as they do in the example and then run it using DoCmd.RunSQL strSQL.
The following example updates the Employees table, changing each sales manager's title to Regional Sales Manager:
Public Sub DoSQL()
Dim strSQL As String
strSQL = "UPDATE Employees " & _
"SET Employees.Title = 'Regional Sales Manager' " & _
"WHERE Employees.Title = 'Sales Manager'"
It's a very powerful way to handle simple tasks that are easiest to do using SQL statements without having to create an actual function or stored procedure to do it.
If you need help on how to write an Update or Insert query check the SQL Server books online or do a google search.
Good luck, let us know if you need any more help.