A
AMH
Hi everyone,
I'm building a client/server DB with Access as the front end and SQL
Server as the backend. I have a subform in which I'm using cascading
combo boxes, however my design seems to be failing! I've found
several examples, and have used them.
The cascading does work, but everytime I insert a new record on the
subform, I
get a "Write Conflict" error, asking me to either undo, copy to
clipboard, or drop changes. Regardless of what I pick, the record is
entered anyway. It seems that it's trying to save the data twice in
one go.... Deleting and updating any of the existing records does not
cause this problem - only inserts.
Here is the code behind the 1st combo box:
______________________________________
Private Sub rm_code_AfterUpdate()
On Error Resume Next
gin.RowSource = "Select distinct batchingred.gin " & _
"FROM batchingred " & _
"WHERE batchingred.rm_code = '" & rm_code.Value & "' " & _
"ORDER BY batchingred.gin;"
End Sub
______________________________________
______________________________________
As I said, the cascade works fine, just not the addition of a new
record. "batchingred" is a stored view, as the form needs to access
two tables at once to display the combo values. I have set the form to
access all data from this view. Data is only updated to one of the
base tables in this view.
Hope someone can help.
I'm building a client/server DB with Access as the front end and SQL
Server as the backend. I have a subform in which I'm using cascading
combo boxes, however my design seems to be failing! I've found
several examples, and have used them.
The cascading does work, but everytime I insert a new record on the
subform, I
get a "Write Conflict" error, asking me to either undo, copy to
clipboard, or drop changes. Regardless of what I pick, the record is
entered anyway. It seems that it's trying to save the data twice in
one go.... Deleting and updating any of the existing records does not
cause this problem - only inserts.
Here is the code behind the 1st combo box:
______________________________________
Private Sub rm_code_AfterUpdate()
On Error Resume Next
gin.RowSource = "Select distinct batchingred.gin " & _
"FROM batchingred " & _
"WHERE batchingred.rm_code = '" & rm_code.Value & "' " & _
"ORDER BY batchingred.gin;"
End Sub
______________________________________
______________________________________
As I said, the cascade works fine, just not the addition of a new
record. "batchingred" is a stored view, as the form needs to access
two tables at once to display the combo values. I have set the form to
access all data from this view. Data is only updated to one of the
base tables in this view.
Hope someone can help.