A
Afrosheen via AccessMonster.com
Good morning. It's me again
Here is my situation. I have one main form that is tabbed "frmRosterTab". I
have a subform "RosterSub1" on that tab. I also have a button that when it is
pressed it unhides another sub form "SubFrmFind". It is this subform I have
questions/problems with.
By it's self it works almost the way I want it to. With the other forms it
doesn't want to work at all. This is where I need the help.
I'm using a filter on the "SubFrmFind". On this subform I have 2 buttons.
Next and Previous. What I want to do is as I move through the filter records
based on the beginning and the end of the records the buttons will be Enabled
= true or Enabled = false. This is the code I have. And like I said, by it's
self works almost fine and I can deal with it.
Private Sub Form_Current()
cmdPrevious.Enabled = Not Me.CurrentRecord = 1
cmdNext.Enabled = Me.CurrentRecord = 1 Or Me.CurrentRecord < Me.
RecordsetClone.RecordCount
End Sub
This is the code that creates the filter:
strWhere = "[lname] Like '" & Me!txtSearch & "' "
Filter = strWhere
FilterOn = True
If Me.RecordsetClone.RecordCount = 0 Then
Call MsgBox("Boo-Hoo, No records found!", vbInformation, Application.Name)
Else
With Me.RecordsetClone
.MoveLast
End With
txtSearch = ""
cmdexit.Enabled = True
End If
I sure would appreciate any help.
Thank you.
Here is my situation. I have one main form that is tabbed "frmRosterTab". I
have a subform "RosterSub1" on that tab. I also have a button that when it is
pressed it unhides another sub form "SubFrmFind". It is this subform I have
questions/problems with.
By it's self it works almost the way I want it to. With the other forms it
doesn't want to work at all. This is where I need the help.
I'm using a filter on the "SubFrmFind". On this subform I have 2 buttons.
Next and Previous. What I want to do is as I move through the filter records
based on the beginning and the end of the records the buttons will be Enabled
= true or Enabled = false. This is the code I have. And like I said, by it's
self works almost fine and I can deal with it.
Private Sub Form_Current()
cmdPrevious.Enabled = Not Me.CurrentRecord = 1
cmdNext.Enabled = Me.CurrentRecord = 1 Or Me.CurrentRecord < Me.
RecordsetClone.RecordCount
End Sub
This is the code that creates the filter:
strWhere = "[lname] Like '" & Me!txtSearch & "' "
Filter = strWhere
FilterOn = True
If Me.RecordsetClone.RecordCount = 0 Then
Call MsgBox("Boo-Hoo, No records found!", vbInformation, Application.Name)
Else
With Me.RecordsetClone
.MoveLast
End With
txtSearch = ""
cmdexit.Enabled = True
End If
I sure would appreciate any help.
Thank you.