arcrazr
New Member
- Joined
- May 7, 2020
- Messages
- 10
- Office Version
- 365
- Platform
- Windows
Hello,
I am trying to located a row in a table [turnoverdata] using entries from a userform (Update). The three columns together should provide a key that will isolate the entry to one row only. (This code should be able to aide that function as well when creating the table entry in the first place in my imagination). The values of the three userform comboboxes are set using code and values from the table so, only entries that already exist should be able to be searched.
So far the best I could come up with is below. I compile okay but get an error that 'object doesn't support this property or method' I have tried setting 'row' as a range, listobject, long. same result
Any help would be appreciated.
I am trying to located a row in a table [turnoverdata] using entries from a userform (Update). The three columns together should provide a key that will isolate the entry to one row only. (This code should be able to aide that function as well when creating the table entry in the first place in my imagination). The values of the three userform comboboxes are set using code and values from the table so, only entries that already exist should be able to be searched.
So far the best I could come up with is below. I compile okay but get an error that 'object doesn't support this property or method' I have tried setting 'row' as a range, listobject, long. same result
Any help would be appreciated.
VBA Code:
Private Sub find_Row()
Dim row As Long
row = [TurnoverData].Index([TurnoverData], [TurnoverData].Match(CDate(Me.CBODateUpdate.Value), [turnoverdata[TBdate]], 0), [TurnoverData].Match(Me _
.CBOLineupdate.Value, [turnoverdata[CBOLine]], 0), [TurnoverData].Match(Me.CBOShiftUpdate.Value, [turnoverdata[FRMShift]], 0)).row
Print row
End Sub