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

Updating Table to New Dropdown List Selection

Status
Not open for further replies.

Lrn2Code

Programmer
Dec 10, 2008
2
US
Hi,

I'm relatively new to programming and am trying to figure out how to update a value in a table when the value in the form changes. The form has a drop down list and I don't know how to get the newly chosen value from that list to be saved. My code related to saving information from that form is pasted below -


Code:
strSQL = "Update tblSchoolClasses set coursename = '" & strName & "' where courseid = " & lngID & " and  coursecat = '" & strcoursecat & "' and POSID = '" & strPSID & "' "
Debug.Print (strSQL)
Set qdf = CurrentDb.CreateQueryDef("", strSQL)
qdf.Execute

The strcoursecat is the category field where the drop down list selection should be updated in the table. Is this something that needs to be coded in the form as an "on change" event procedure? If so, how does that work?

Thank you for any guidance you can provide.
 
Hi,

You might want to ask Access related questions in an Access forum like forum702, forum705

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks! I tried to do a search yesterday but must not be using the right terms. I'll do more research. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top