R
Rhonda Fischer
Hello,
I am using the below stated bit of code to display an
integer value in a textbox (fuelsurcharge) on selecting
a Supplier from a combo drop down list.
I am not sure of the relevance of the last line of code
Me.Bookmark = rs.Bookmark
that I have commented out. When I reinstate this line
of code I receive the following error message:
Single-row update/delete affected more than one
row of a linked table. Unique index contains
duplicate values
however I also receive this error message when I make
a new selection of Supplier, where the fuelsurcharge is
display and then change the form into Design Mode. So
I think there is something wrong?
How can I change my code to avoid this error message?
Why does it occur when I am not trying to change the
data in the table just view the form in design mode?
Thank you very much for any suggestions
Kind Regards
Rhonda
'************************************************
Private Sub cboSupplierName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[supplierID] = " & Str(Me!
[cboSupplierName])
txtFuelSurcharge = rs!fuelSurcharge
'Me.Bookmark = rs.Bookmark
End Sub
'*************************************************
I am using the below stated bit of code to display an
integer value in a textbox (fuelsurcharge) on selecting
a Supplier from a combo drop down list.
I am not sure of the relevance of the last line of code
Me.Bookmark = rs.Bookmark
that I have commented out. When I reinstate this line
of code I receive the following error message:
Single-row update/delete affected more than one
row of a linked table. Unique index contains
duplicate values
however I also receive this error message when I make
a new selection of Supplier, where the fuelsurcharge is
display and then change the form into Design Mode. So
I think there is something wrong?
How can I change my code to avoid this error message?
Why does it occur when I am not trying to change the
data in the table just view the form in design mode?
Thank you very much for any suggestions
Kind Regards
Rhonda
'************************************************
Private Sub cboSupplierName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[supplierID] = " & Str(Me!
[cboSupplierName])
txtFuelSurcharge = rs!fuelSurcharge
'Me.Bookmark = rs.Bookmark
End Sub
'*************************************************