Access form error
Posted on 2011-10-25
I have a form that uses a query on a single table as a record source, I want to change one record on click of a combo so I added this to the click event: -
sql = "SELECT tbl_Complaints.IdNumber, tbl_Complaints.TxtCategory "
sql = sql & "From tbl_Complaints "
sql = sql & "WHERE tbl_Complaints.IdNumber=" & Me!IdNumber
Set Rst = Dbs.OpenRecordset(sql, dbOpenDynaset, dbSeeChanges)
If Rst.RecordCount > 0 Then
If Me!CboCompCat = "None" Then
Rst!TxtCategory = ""
Rst!TxtCategory = Me!CboCompCat
If the user changes a record on the form and then clicks the combo they get an error. I can't seem to replicate this and they are using Access runtime so I can't identify the error.
Can anyone help?