albertc30
Well-known Member
- Joined
- May 7, 2012
- Messages
- 1,091
- Office Version
- 2019
- Platform
- Windows
Hi all.
I have the update form with a combobox that lists all names on spread sheet. Once one is selected it then populates the entire form with remain data in accordance with the name that was selected.
Now, when I click on the update command button, I'm getting an error.
I am watching this youtube video but the form on the video knows which line is currently selected so it updates correctly, my form however does not.
What is missing in the above form in order to look for the correct row and update it please?
As always, I am much appreciated and grateful for all the time you all spend helping others.
Cheers.
I have the update form with a combobox that lists all names on spread sheet. Once one is selected it then populates the entire form with remain data in accordance with the name that was selected.
Now, when I click on the update command button, I'm getting an error.
I am watching this youtube video but the form on the video knows which line is currently selected so it updates correctly, my form however does not.
Code:
Private Sub upcubton_Click()
answer = MsgBox("Are you sure you want to update customers details?", vbYesNo + vbQuestion, "Update Record")
If answer = vbYes Then
Cells(currentrow, 2) = tbncn.Value 'it does not know where current data in form is on spreadsheet!!! ops...
End If
End sub
What is missing in the above form in order to look for the correct row and update it please?
As always, I am much appreciated and grateful for all the time you all spend helping others.
Cheers.