ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Hi,
I open up my userform & see the customers name along with his records.
I click on Next Record which then shows the next customer as expected,i can do this for the next & the next
BUT
The values in Textboxes 2-7 dont change.
Example.
Customer is Tom Jones Textboxes 2-7 show Green Green Grass Of Home.
I select Next Record who is Elvis Presley & i still see Gren Green Grass Of Home.
Textboxes 2-7 dont alter.
I looked at the code for the Next Record button which just shows this.
But i did also find this.
My problem is i am unable to locate the code for where lets say i need to change row A-T for A-W etc etc to populate "maybe not correct word" but maybe the range to look at is incorrect ?
Thanks
I open up my userform & see the customers name along with his records.
I click on Next Record which then shows the next customer as expected,i can do this for the next & the next
BUT
The values in Textboxes 2-7 dont change.
Example.
Customer is Tom Jones Textboxes 2-7 show Green Green Grass Of Home.
I select Next Record who is Elvis Presley & i still see Gren Green Grass Of Home.
Textboxes 2-7 dont alter.
I looked at the code for the Next Record button which just shows this.
VBA Code:
Private Sub NextRecord_Click()
Navigate Direction:=xlNext
End Sub
But i did also find this.
Code:
Sub Navigate(ByVal Direction As XlSearchDirection)
Dim i As Integer
Dim LastRow As Long
LastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
r = IIf(Direction = xlPrevious, r - 1, r + xlNext)
'ensure value of r stays within data range
If r < startRow Then r = startRow
If r > LastRow Then r = LastRow
'get record
For i = 1 To UBound(ControlNames)
Me.Controls(ControlNames(i)).Text = IIf(Direction = xlNone, "", ws.Cells(r, i).Text)
Next i
Me.Caption = "Database"
'set enabled status of next previous buttons
Me.NextRecord.Enabled = IIf(Direction = xlNone, False, r < LastRow)
Me.PrevRecord.Enabled = IIf(Direction = xlNone, False, r > startRow)
EventsEnable = False
Me.ComboBoxCustomersNames.ListIndex = IIf(Direction = xlNone, -1, r - startRow)
EventsEnable = True
End Sub
My problem is i am unable to locate the code for where lets say i need to change row A-T for A-W etc etc to populate "maybe not correct word" but maybe the range to look at is incorrect ?
Thanks