Hi,
I am having trouble opening a form and editing a record based on the record i selected from my listbox. I have tried two codes and both failed..ill just state the codes here:
1st code:
DoCmd.OpenForm "AddNewBorrower", , , _
"[tblBorrowerDetails.BorrowerSerialNo]=" & _
"'" & Me.searchborrower.Column(0) & "'"
I encountered run time error '2501' for this. previously when i did this it worked.....but now it cant.
2nd code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AddNewBorrower"
stLinkCriteria = "[tblBorrowerDetails.BorrowerSerialNo]='" & Me.[searchborrower.column(0)] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
i encountered run time error'2465' for this one and this is the new code im trying now. Please help as i really tried everything but nothing works.
I am having trouble opening a form and editing a record based on the record i selected from my listbox. I have tried two codes and both failed..ill just state the codes here:
1st code:
DoCmd.OpenForm "AddNewBorrower", , , _
"[tblBorrowerDetails.BorrowerSerialNo]=" & _
"'" & Me.searchborrower.Column(0) & "'"
I encountered run time error '2501' for this. previously when i did this it worked.....but now it cant.
2nd code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AddNewBorrower"
stLinkCriteria = "[tblBorrowerDetails.BorrowerSerialNo]='" & Me.[searchborrower.column(0)] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
i encountered run time error'2465' for this one and this is the new code im trying now. Please help as i really tried everything but nothing works.