By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

Add a record to a table

P: n/a
I've a combobox associated to a table and want to add a value (record) to
the table through the combobox? So I insert a value in the combobox and
automaticly a record is adding to the table associated with the combobox.
Any idea how I can do that?
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Private Sub ComboBox_AfterUpdate()
If DCount("[ItemColumn]","tblName","[ItemColumn]="_
& Me.ComboBox.Value) = 0 Then
DoCmd.RunSQL "INSERT INTO tblName (ItemColumn)"_
& " VALUES ('" & Me.ComboBox.Value & "');"
End If
End Sub

*Not Tested*

Alec Christie

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.